Archive for August 2011
Resolved: “Access denied” error on System.Diagnostics.Process.Start
Wrote a piece of code which would launch an application exe using Process.Start, on development machine it worked without a problem but when deployed on client machine it started giving “Access Denied” error.
It turned out that when the code runs in domain controlled user environement Process.Start needs a set of security credentials by default to run. Now, in practical scenario we can not just hard code any credentials or even prompt for input.
The solution, there is an attribute called UseShellExecute which needs to be set False , this will allow the exe to be launched without credentials.
Sample code goes like this :