Tricks for the IIS reset geek

IIS? Yeah you know the Microsoft web server! One of only two stable web servers in the world wide web. Yes there are others but notice the stable term there.

 

cooler2

(random Pic)

Seems like a web developers best friend is IISreset. Cause it clears the services and cache and starts “anew” Lets dive into the IISreset

IISRESET.EXE (c) Microsoft Corp. 1998-2005

Usage:
iisreset [computername]

/RESTART            Stop and then restart all Internet services.
/START              Start all Internet services.
/STOP               Stop all Internet services.
/REBOOT             Reboot the computer.
/REBOOTONERROR      Reboot the computer if an error occurs when starting,
stopping, or restarting Internet services.
/NOFORCE            Do not forcefully terminate Internet services if
attempting to stop them gracefully fails.
/TIMEOUT:val        Specify the timeout value ( in seconds ) to wait for
a successful stop of Internet services. On expiration
of this timeout the computer can be rebooted if
the /REBOOTONERROR parameter is specified.
The default value is 20s for restart, 60s for stop,
and 0s for reboot.
/STATUS             Display the status of all Internet services.
/ENABLE             Enable restarting of Internet Services
on the local system.
/DISABLE            Disable restarting of Internet Services
on the local system.

So as you can tell there is a fun amount of things you can do.

My favorite is: iisreset microsoft.com /reboot

Yes notice the reboot param. Ok wait a minute you can reset the entire server or web garden (web servers) with this command? wha wha what?

even more fun can be iisreset microsoft.com /rebootonerrror

However there is a caveat to all of this.

you will need to check and make sure that TCP port 2335 is open on the target server via its firewall. Otherwise, iisreset will give you such an error message.

However you can do a little registry hacking according to mr KB article.

On the Server Computer:

  1. From the Start menu, click Run, type DCOMCNFG, and then click OK.
  2. On Default Protocols tab, move Connection-oriented TCP/IP protocol to the top of the list.
  3. Using tools such as OLEVIEW, find your application’s AppId globally unique identifier (GUID).
  4. Start the Registry Editor (Regedt32.exe).
  5. Locate the following key in the registry:HKEY_CLASSES_ROOT\AppId\{AppId GUID}
  6. On the Edit menu, click Add Value, and then add the following registry value:Value Name: Endpoints
    Data Type: REG_MULTI_SZ
    Value: ncacn_ip_tcp,0,<port number>

    where <port number> is the static port that you want to use.

  7. Quit the Registry Editor.
  8. Restart the computer.

Anyway happy reseting IIS and playing with some of the great little features it employs.

anigif_enhanced-buzz-8559-1340644787-2

(random gif)

Another Yawn of an article brought to you buy The pranksters of mikedopp.com and friends.

 
This entry was posted in How To, IIS, Microsoft, Utility, Web Development, Windows and tagged , . Bookmark the permalink.

Leave a Reply