Help - Run process through Web service withou ASPNET user

A

Aviad C

Hello
I created a web service that runs a new process whice is a vbscript.
It all works well, i can see the wscript.exe running in the Task
Manager under the user ASPNET but nothing happened.
I did a little test, wrote a vbs that creats a folder but still nothing
happened. it runs in the background doing nothing. no error, no
exception.
I changed the Web.config to use impersonate="true". after that even
added the local Administrator to the userName of the impersonation but
still nothing.
I searched the web for 2 days, saw a lot of people had this problam but
no one had a solution.

The code is very simple:
Process pRun = new Process();
pRun.StartInfo.FileName = "c:/RunCommand.vbs";
pRunCmd.Start();

can anyone help?
Thanks
 
L

Lars Behrmann

Hi Aviad,

not shure but i think that's a permission problem.
The Aspnet user is very restricted so change it to system.
Try out the following: Search your for your machine.config.
Open it with an editor and search for the xml element
processModel and set the userName attribute to system.
After that you should restart your pc and then start your
webservice it now should run as system user which should
have the permission to start a service.

If you have not changed you should find the machine.config here:

C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\CONFIG\machine.config

Hope that helps.

Cheers
Lars Behrmann

_________________
Nothing is impossible. UML is the key for all your problems.
AODL - Make your .net apps OpenOffice ready
http://aodl.sourceforge.net
 

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