Running iisreset

Discussion in 'ASP General' started by Lee, Oct 13, 2003.

  1. Lee

    Lee Guest

    Hello all,

    I am trying to perform a reboot on my server from an asp
    page. I have a link on my page that, when clicked on,
    redirects to a .stm page that displays a message about
    the server rebooting and executes the following command:
    <!-- #exec CMD="cmd.exe /C iisreset /REBOOT" -->. When I
    click on the link the message is displayed but the server
    does not reboot. I know that in order for the #exec
    command to work you have to add a key in the registry,
    and disable anonymous access to the folder containing
    the .stm page. I have done both of these and yet I still
    can't get the server to reboot. Can anyone help me with
    this, or know another way that I can browse to an asp
    page on the server and perform a reboot?
    Lee, Oct 13, 2003
    #1
    1. Advertising

  2. Lee

    Ray at Guest

    I reboot my server using:

    <%
    Server.CreateObject("WSCript.Shell").Run "cmd.exe /c iisreset /reboot"
    %>

    in an ASP page in a directory with anonymous access disabled.

    Ray at work

    This is what I assume I use
    "Lee" <> wrote in message
    news:02a001c3919e$9b1300c0$...
    > Hello all,
    >
    > I am trying to perform a reboot on my server from an asp
    > page. I have a link on my page that, when clicked on,
    > redirects to a .stm page that displays a message about
    > the server rebooting and executes the following command:
    > <!-- #exec CMD="cmd.exe /C iisreset /REBOOT" -->. When I
    > click on the link the message is displayed but the server
    > does not reboot. I know that in order for the #exec
    > command to work you have to add a key in the registry,
    > and disable anonymous access to the folder containing
    > the .stm page. I have done both of these and yet I still
    > can't get the server to reboot. Can anyone help me with
    > this, or know another way that I can browse to an asp
    > page on the server and perform a reboot?
    Ray at, Oct 13, 2003
    #2
    1. Advertising

  3. Cool, what's the URL and credentials? I'll schedule a VBS script to hit it
    every 5 minutes. Mwahahahaha. :)


    > I reboot my server using:
    >
    > <%
    > Server.CreateObject("WSCript.Shell").Run "cmd.exe /c iisreset /reboot"
    > %>
    >
    > in an ASP page in a directory with anonymous access disabled.
    Aaron Bertrand - MVP, Oct 13, 2003
    #3
  4. Lee

    Ray at Guest

    Cruel

    Ray at work

    "Aaron Bertrand - MVP" <> wrote in message
    news:...
    > Cool, what's the URL and credentials? I'll schedule a VBS script to hit

    it
    > every 5 minutes. Mwahahahaha. :)
    >
    >
    > > I reboot my server using:
    > >
    > > <%
    > > Server.CreateObject("WSCript.Shell").Run "cmd.exe /c iisreset /reboot"
    > > %>
    > >
    > > in an ASP page in a directory with anonymous access disabled.

    >
    >
    Ray at, Oct 13, 2003
    #4
    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. Tarundeep Singh Kalra

    where is IISRESET.exe

    Tarundeep Singh Kalra, Apr 13, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    7,112
  2. Sunil Menon
    Replies:
    2
    Views:
    548
    Sunil Menon
    Jul 27, 2003
  3. \Rob\
    Replies:
    0
    Views:
    423
    \Rob\
    May 10, 2004
  4. Reader

    iisreset? why does this work?

    Reader, Oct 15, 2004, in forum: ASP .Net
    Replies:
    5
    Views:
    3,771
    Reader
    Oct 18, 2004
  5. Andy Fish
    Replies:
    4
    Views:
    3,011
    Patrice
    Mar 16, 2005
Loading...

Share This Page