security steps to allow webservice to run exe

B

Billy Greening

What are the steps needed to give my webservice adequate security
priveledges to run an exe?

Here is my basic webmethod:

Process proc = null;

ProcessStartInfo procInfo = new ProcessStartInfo("Notepad.exe");

procInfo.UseShellExecute = false;

procInfo.CreateNoWindow = true;

proc = Process.Start(procInfo);

proc.WaitForExit();

return "ok";



With the 'wait for exit' piece in there, it never returns anything. If I
take that out, the 'ok' result comes up fine. Either way, notepad never
pops up.

I have found several people with the same issue when searching on google,
but haven't found any real answers. Any help is greatly appreciated.
Thanks,

Billy

(e-mail address removed)
 
G

Gary Chang[MSFT]

M

[MSFT]

Hello Billy,

We cannot expect any windows form UI come from an ASP.NET application. The
"Notepad.exe" will be running in a different desktop and we cannot view
it. Anyway, you may find it in Task Manager.

From security, we need enough pemission to run such an application, for
example, we may need Read permission to the folder of "Notepad.exe" and
Write permission to temp folder. When you need to run such an application,
you may try impersonate in ASP.NET:

How to implement impersonation in an ASP.NET application
http://support.microsoft.com/default.aspx?scid=KB;EN-US;Q306158

Hope this help,

Luke
 

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,754
Messages
2,569,525
Members
44,997
Latest member
mileyka

Latest Threads

Top