I\'ve read a lot of articles. But as far as I know I\'ve done all. On local computer VS2010 all works fine. The problem occurs only when working on IIS7 Server.
I wan
What helped me is this: Setting in Application Pool Identity = LocalSystem
Hopefully it will help somebody...
var p = new Process
{
StartInfo =
{
FileName = Path,
UseShellExecute = false,
}
};
p.Start();
Edit:
After a long journey, me and Nasenbaer have found the following. The possible reasons for IIS to fail run an EXE are:
Original answer:
You need to assign FullControl security permissions for the IIS AppPool\DefaultAppPool
user, on the directory the EXE is located in. This is the user that is trying to run the process (assuming you are using the DefaultAppPool
), and without the proper permissions, it is unable to do so.
When you run the EXE manually, you are using the Windows logged in user. This is why you are able to lunch it manualy. The IIS uses the Application Pool user.
To add permissions just do the following:
IIS AppPool\DefaultAppPool
FullControl
Screenshot: