다음을 통해 공유


Start or Stop the Web Server (IIS 8)

 

Applies To: Windows Server 2012 R2, Windows Server 2012

You can stop IIS when you want to stop the web server from serving content, such as when you upgrade applications. To stop the web server, you must stop the Windows Process Activation Service (WAS) and the World Wide Web Publishing Service (W3SVC). You can then start the web server when you are ready for the web server to serve content again.

When you stop WAS and W3SVC, all sessions connected to your web server are dropped. Any in-memory session state is lost. All sites are unavailable until these services are restarted. Therefore, avoid stopping and restarting your web server if you can.

Note

You must be a server administrator to perform this procedure.

To start or stop a web server

You can perform this procedure by using the user interface (UI) or a command line. For information about opening IIS Manager, see Open IIS Manager (IIS 8).

Using the UI

  1. Open IIS Manager and navigate to the web server node in the tree.

  2. In the Actions pane, click Start if you want to start the web server, Stop if you want to stop the web server, or Restart if you want to first stop IIS, and then start it again.

Using a command line

  1. Open an elevated command-line window.

  2. At the command prompt, type net stop WAS and press ENTER; type Y and then press ENTER to stop W3SVC as well.

  3. To start the web server, type net start W3SVC and press ENTER to start both WAS and W3SVC.

Note

If you want to stop IIS first, and then start it again, type iisreset /restart and press ENTER.

See Also

IIS Manager UI (IIS 8)