Sunday, April 27, 2014

Not able to invoke exe from published solution

Need to invoke abc.exe from my 4.5 VS web application which is stored under the path C:XYZ.


The command used for the same is C:\XYZ\abc.exe -PZ:\XYZ\123456


Here Z:\XYZ\123456 is a virtual path and some images are stored inside it.


This abc.exe will render images form virtual path and show the same. This works fine when I run the application but when I publish the solution it is not working.


Here is My code:



string FileName1 = WebConfigurationManager.AppSettings["FileName1"].ToString(); //"C:\XYZ\abc.exe"

string FilePath = WebConfigurationManager.AppSettings["ImageURL"].ToString(); //"-PZ:\XYZ\"

ProcessStartInfo TestPS= new ProcessStartInfo();

TestPS.FileName = FileName1;

TestPS.Arguments = FilePath ;

Process.Start(TestPS);



Anyone share ur answers


Thanks,


Sathish



No comments:

Post a Comment