Running a Process with <impersonate="true">

  • Thread starter Thread starter joeted
  • Start date Start date
J

joeted

Hello,

I am trying to run a batch file on a (remote) .NET server (i'm not the
admin) using system.diagnostics.process

I find that the batch file is successfully executed.

However, when i put <identity impersonate="true"/> in my web.config i
get an "access denied" exception.

This line in web.config is required as it was the only way (i have
successfully found) i could also write to a text file from an aspx page.
[ using StreamWriter from system.io ]

I have also tried it with and without <authentication mode="windows">

As far as I understand the impersonate=true makes the "internet guest
account" (machine\IUSR) run the process?

Any solution that would allow me to do both tasks (with or without
impersonation) would be appreciated.
 
YES!!

This solution works fine and I can now do both tasks within
the same application.

Thanks a bunch, Martin.
 

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

Back
Top