Why shouldn’t I run IIS Reset on Azure?
When you run IIS Reset, one of the things that happens is that the Windows World Wide Web Publishing Service (W3SVC), the service responsible for connecting clients to your website, is stopped. In classic Windows Server, the “Startup Type” of W3SVC is Automatic. Thus, the W3SVC service restarts automatically and everything works fine. On Windows Azure, however, W3SVC is set to “demand start” so that the Windows Azure Agent that runs inside your Web Role can configure W3SVC before starting the role. Unlike IIS in classic Windows Server, an IIS role in Azure is not intended to be always running but instead has its lifecycle controlled by the Azure platform.If not IIS Reset, then what?
If you are having trouble with your web application hosted on Windows Azure and think the issue might be related to your IIS host, we recommend the following course of action:- Try to identify the root cause of the failure rather than temporarily relieving the symptom. https://blogs.msdn.com/b/kwill/archive/2013/09/19/troubleshooting-scenario-5-internal-server-error-500-in-webrole.aspx might be a good place to start, or use Visual Studio to perform remote debugging - . If you are unable to find the root cause of the problem consider contacting Microsoft Azure Support or posting in the forums where our support team can assist in identifying the problem.
- Make sure you have more than 1 role instance so that the Azure load balancer can send incoming traffic to healthy instances. You may also want to consider implementing a custom Load Balancer Probe so that the load balancer is able to direct traffic correctly when Azure considers the role healthy but IIS is not working correctly.
- As a last resort, if you simply need to get your website back online quickly and want to worry about debugging the problem later then perform a restart of the role or a reboot through the Windows Azure Management Portal instead of iisreset.
Follow these steps to bring your website back up:
- From inside your Microsoft Azure Web Role or Worker Role, go to Start > services.msc
- In the list of Services (Local), scroll down to find “World Wide Web Publishing Service”. Found it?
- Now, right-click on “World Wide Web Publishing Service” and click Start. TADA! Your website should be back up.
However, if you website is still unreachable, I recommend going back to the Azure Management Portal and rebooting your VM by going to the INSTANCES tab under your Cloud Service and hitting Reboot on your web role, like this (if you have more than one role instance, you only need to reboot the instance that you ran “iisreset” on):
Hope this helps!
