Inside a .NET 3.5 web app running impersonation I am trying to execute a process via:
var process = new Process
{ StartInfo =
{ CreateNoWindow = true,
FileName = "someFileName",
Domain = "someDomain",
Username = "someUserName",
Password = securePassword,
UseShellExecute = false
}
};
process.Start();
-Changing the trust mode to full in web.config did not fix.
-Note the var securePassword is a secureString set up earlier in the code.
This throws an exception with 'Access is Denied' as its message. If I remove the username and password information, the exception goes away, but the process starts as aspnet_wp instead of the user I need it to.
I've seen this issue in multiple forums and never seen a solution provided. Any ideas?