security steps to allow webservice to run exe

Discussion in 'ASP .Net Security' started by Billy Greening, Aug 19, 2005.

  1. 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

     
    Billy Greening, Aug 19, 2005
    #1
    1. Advertising

  2. Gary Chang[MSFT], Aug 20, 2005
    #2
    1. Advertising

  3. Billy Greening

    [MSFT] Guest

    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
     
    [MSFT], Aug 22, 2005
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Jeff
    Replies:
    2
    Views:
    987
    clintonG
    Sep 19, 2006
  2. Metalone
    Replies:
    5
    Views:
    294
    Thomas Heller
    Oct 19, 2007
  3. Flyguy
    Replies:
    3
    Views:
    820
    Steven Cheng [MSFT]
    Apr 25, 2008
  4. daved170

    run exe and create exe

    daved170, Oct 11, 2009, in forum: Python
    Replies:
    3
    Views:
    490
    Benjamin Kaplan
    Oct 11, 2009
  5. Ryan Taylor
    Replies:
    1
    Views:
    718
    Ryan Taylor
    Sep 9, 2004
Loading...

Share This Page