Sometimes we accidentally use an endless loop in a web program such as ASP, or when testing the DLL component, it crashes. At this time, IIS stops responding. Let's continue our work. Restart the IIS service.
However, this process is still being executed and the Internet Service Manager cannot be closed. If you want to modify inetinfo.exe or DLLHOST. EXE
When the process is running, we get a denial message. Of course, if you are an administrator, you still get this prompt. You may also use net
Stop, but it takes a longer time and sometimes does not respond. At this time, we only need to restart the computer. Can I restart IIS without restarting my computer?
Of course, Microsoft installed a tool named iisreset when installing IIS. you can install it in winnt/system32
And can be used in command line like Ping. It has multiple parameters. Below are several important parameters that we have selected in this article:
/Restart
Start IIS
/Start IIS (if it is stopped)
/Stop IIS (if started)
/Reboot restart the computer
/Rebootonerror restart your computer if you fail to stop IIS
/Noforce does not need to force IIS to stop
/Timeout: x
After x seconds, IIS is forcibly stopped unless the/noforce parameter is given. If/rebootonerror is given, it restarts the computer.
You can also run the following command in cmd:
Iisreset/start
-------------------
Iisreset. EXE (c) Microsoft Corp. 1998-1999
Usage:
Iisreset
[Computername]
/Restart stop and restart all Internet services.
/Start all
Internet service.
/Stop: Stop all Internet services.
/Reboot restarts the computer.
/Rebootonerror if an error occurs when the Internet service is started, stopped, or restarted,
Then restart the computer.
/Noforce
If you attempt to stop the service normally, do not forcibly terminate the internet service.
/Timeout: Val indicates waiting for Internet
The timeout value (in seconds) for the successful service stop ).
If you have specified the rebootonerror parameter, You can restart it after timeout.
Computer.
The default value of service restart is 20 seconds, and the value of stop is 60 seconds.
The restart time is 0 seconds.
/Status display all Internet
Service status.
/Enable Internet service restart on the local system.
/Disable the Internet on the local system
Service restart.
Restart the BAT file of IIS:
@ Echo off <br/> does title restart IIS? <Br/> Does ECHO restart IIS? <Br/>: Select <br/> set/P restart = enter your selection (y/N ): <br/> If "% restart %" = "Y" Goto restart <br/> If "% restart %" = "Y" Goto restart <br/> If" % restart % "=" N "Goto stop <br/> If" % restart % "=" N "Goto stop <br/> goto select <br/>: restart <br/> title is Restarting IIS. Please wait... <br/> iisreset/restart <br/> title IIS restart completed <br/> echo IIS restart completed <br/> pause <br/> exit <br/>: stop <br/> title: if you choose not to restart, any key will exit! <Br/> ECHO: You have chosen to exit without restarting! <Br/> pause <br/> exit