Start Process in Specific Windows Account?

G

Guest

One of our ASP.NET Pages is starting a new Process using the Process object.
When the process starts, it is started under the ASPNET User. We tried
editing the web.config file and the machine.config to operate under other
user accounts but our dynamically started process still starts under ASPNET.
How do you programatically start a process under a specific Windows User
Account? Thanks so much!

Christopher
 
N

Nicholas Paldino [.NET/C# MVP]

Christopher,

How did you modify the web.config file? Are you sure you set the
impersonation tag correctly?

Also, you could try to call the Impersonate method on the
WindowsIdentity class. The documentation will tell you how to call
LoginUser and call that method to impersonate a user.

If that fails, then you can call the CreateProcessAsUser API function to
spawn a process off as another user.

Hope this helps.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top