Run 3rd party app as specified user

G

Guest

Hi,

I'm writing a web service where one method will launch another .NET program
under a specified user's account. It launches fine as the NT
AUTHORITY\NETWORK SERVICE user when I dont specify a username/password for
the processStartInfo but I am having trouble getting it to work when I
specify any other username/password pair. I immediately get "The application
failed to initialize properly (0xC0000142).

Has anyone ever gotten this to work using Process.Start/ProcessStartInfo?

Note I do *not* want to impersonate the client nor have any of the other
code run during the processing of the request run using any credentials other
than NETWORK SERVICE so I don't think I want any form of impersonation that
can be configured through web.config, machine.config, etc. I only want the
third party app I want to launch and get the stderr/stdout streams back from
to be run in the specified user account.

Also this fails identically regardless of the setting of "Allow service to
interact with desktop" for the www service although idealy I would like it to
work with that not checked. For some strange reason I don't see a desktop
property on the managed ProcessStartInfo like there is on the unmanages
startinfo struct...

Thanks in advance :)

-john
 

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

Members online

Forum statistics

Threads
473,982
Messages
2,570,186
Members
46,740
Latest member
JudsonFrie

Latest Threads

Top