I have an asp.net mvc 4 applicatin, that has Process.Start() call to console application (written in c++).
The problem is that the console application doesn't run appropriately from the asp.net application (it generates image from a site, and the image is all white).
When I use the same call from Console Application it works perfectly.
As I see it, it should be privileges problem.
I am not quit sure if the ASP.NET runs from the same user, but I saw here that it runs under my user account (which is admninistrator) so it is really weird.
Things I've tried:
process.StartInfo.UseShellExecute = true/false.
process.StartInfo.UserName and Password of administrator user.
Edit the IIS Configuration file at C:\Users\MyUser\Documents\IISExpress\config\applicationhost.config changing from:
<applicationPoolDefaults managedRuntimeLoader="v4.0" > <processModel/> </applicationPoolDefaults>
to:
<applicationPoolDefaults managedRuntimeLoader="v4.0" > <processModel userName="administrator username" password="administrator password"/> </applicationPoolDefaults>
so if anonymous requests will execute under the identity of the process, and the process doesn't have the privileges, the explicit user will be used for the anonymous authentication. Taken From Here
Thanks for the help!