Most of us in Web Development would have used the simple commandline utility called 'iisreset'. And most of us would just use it without passing any special arguments to it so it does the work of stopping IIS services first and then restarting it.
In one of my previous organization, during deployment, I actually wanted a quick method to IISRESET and windows reboot. While I was doing them seperately using iisreset and rundll32 to reboot, I accidentally came across this switch which I would like to share here.
1) Reboot System: Pass a timeout of 1 second and a flag to REBOOTONERROR. [Eg] iisreset /timeout:1 /rebootonerror
Basically, the trick is requesting restart of IIS services in less than a second, which would be impossible for managing a minimum of two windows services and hence since this is always an error condition, the handler situation of rebooting the system is resorted to.
2) ENABLE and DISABLE When you pass /disable, future attempts to restart IIS services are blocked. However, note that IIS can still be restarted without any hassles from Control Panel servics. The /enable switch restores restart IIS services.
I hope this would be a valuable tip for web developers worldwide in managing their IIS and Windows health.
|
| Author: Balamurali Balaji 16 May 2008 | Member Level: Diamond Points : 2 |
Hi,
you are correct. All my server related problems gone most of the times when I do reset the IIS. In fact, with IIS 7.0, it is available easily as an option in a pop-up; we donot even go for a command line execution of iisreset.
goodluck
|
| Author: Vasudevan Deepak Kumar 16 May 2008 | Member Level: Diamond Points : 2 |
@Bala,
Thanks for sharing your observation regarding IIS 7.0. At the moment, I am still using only IIS 6.0 on Windows Server 2003 and hence yours is a good information tip for me. Thanks for sharing it.
Deepak
|