Home Web sites cannot be started unless WAS and the World Wide Web Publishing Service are running
Post
Cancel

Web sites cannot be started unless WAS and the World Wide Web Publishing Service are running

Today I was working on a new Continuous Development task for one of my Projects. I was testing if it works and got an error message. After Fixing the error I rerun the deployment and got an error in an earlier step where I use a PowerShell script to stop the Default WebAppPool. It was strange because the script worked fine before. I found out that the problem was that the World Wide Web Publishing Service wasn’t running. In this post, I will tell you how to fix this problem.

The error

During the CD I got the following error while executing the PowerShell script: [error]Command execution stopped because the preference variable “ErrorActionPreference” or common parameter is set to Stop: Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED)). The script only contains two lines of code:

Import-Module WebAdministration
Stop-WebSite ‘Default Web Site’

After I encountered this error I connected to the Server and saw that the WebAppPool (IIS –> Sites –> Default Web Site) wasn’t running. I clicked on Start and got the following error message:

Default Web Site error

Starting the World Wide Web Publishing Service (W3SVC)

After that, I went to the Services (Computer–> right click on manage –> Configuration –> Services or directly Services in the Start menu) and saw that the World Wide Web Publishing Service wasn’t running. Right-click the service and select Start. Then the service should be running. You can see that on the left column where you should have the Options Stop and Restart the service.

World Wide Web Publishing Service

After I started the services manually, the PowerShell script could stop the WebAppPool automatically.

Further reading

For more information see Technet.

This post is licensed under CC BY 4.0 by the author.

Whats new in C# 6.0

Whats new in C# 7.0

Comments powered by Disqus.