I've got a problem application that requires that the IIS services be restarted often. I want to allow non administrators to reset the IIS services on this box by visiting a web page that gives them a button to execute this.
I wrote the code below and it is getting the following access denied error (below). I have the virtual directory anonymous access running under local admin credentials on the box, so I'm not understanding this error. I'm testing the code on XP SP3.
This is the output: "IIS Reset - Access denied, you must be an administrator of the remote computer to use this command. Either have your account added to the administrator local group of the remote computer or to the domain administrator global group. "
I realize that this is not a good security practice, but desperate times call for ...
Set WshShell = CreateObject("WScript.Shell")
Set strResponse = WshShell.Exec("iisreset")
Set WshShell = Nothing
Response.Write("IIS Reset - " & strResponse.stdOut.ReadAll())