restarting IIS from within ASP.NET

Discussion in 'ASP .Net' started by Simon Weaver, Jul 22, 2003.

  1. Simon Weaver

    Simon Weaver Guest

    I want to restart IIS from within ASP.NET from a WAP enabled phone.
    That way if I'm on the beach and the server slows down I can just restart it
    manually. I'd also like to be able to programatically kill other executables
    on demand (i.e. please dont stop me and tell me that IIS restarts itself).

    There is a pskill.exe executable available from sysinternals.com which works
    just fine. BUT I cannot get it to run because it doesnt have enough
    permissions.

    process = new System.Diagnostics.Process();
    process.StartInfo.UseShellExecute = true;
    process.StartInfo.RedirectStandardOutput = false;
    process.StartInfo.FileName = "pskill.exe";
    process.StartInfo.Arguments = "consoleappserver.exe";
    process.Start();

    I want to minimize the security risk of opening security to allow this to
    run,
    although all code on the server is trusted. NB. I have rights to pskill.exe,
    its just
    that program that cannot run anything.

    The error I get is:

    PsKill v1.03 - local and remote process killer Copyright (C) 2000 Mark
    Russinovich http://www.sysinternals.com Unable to kill process
    consoleappserver.exe: Access is denied.

    Note: even if the ASPNET Username has started the consoleappserver.exe
    process it
    still cannot kill it.

    -Simon
     
    Simon Weaver, Jul 22, 2003
    #1
    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. Mark Feather

    Problems after restarting IIS ????

    Mark Feather, Jul 14, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    456
    Mark Feather
    Jul 14, 2003
  2. Bosh
    Replies:
    0
    Views:
    741
  3. davidw
    Replies:
    3
    Views:
    421
    Curt_C [MVP]
    Aug 27, 2004
  4. Balaram Barange
    Replies:
    1
    Views:
    423
    Juan T. Llibre
    Jun 7, 2005
  5. Thomas Smith
    Replies:
    1
    Views:
    158
    Mathew Uthup
    Jun 22, 2005
Loading...

Share This Page