47

I just installed IIS7, but whenever I want to start it, the following error occurs:

Cannot start service W3SVC on computer '.'

What's wrong with it ?

I have Windows 7 64-bit build 7600 and have installed .NET Framework 3.5 SP1 and .NET Framework 4 before installing IIS7.

Gaff
  • 18,569
  • 15
  • 57
  • 68
Mohammad Dayyan
  • 1,763
  • 11
  • 41
  • 55
  • 1
    Does the Event Log have anything to add to the error? This thread may help: http://forums.iis.net/t/1151484.aspx – BillP3rd Aug 16 '10 at 20:23
  • For me, IIS failed to start because "Windows Activation Process" failed to start with error "Error 1: Incorrect function.". For this, I took the solution from this post: https://stackoverflow.com/a/64395930/2546759 – Nir Jul 04 '23 at 06:46

15 Answers15

34

Go to Task Manager --> Processes and manually stop the W3SVC process. After doing this the process should start normally when restarting IIS

Andy J
  • 341
  • 3
  • 2
  • 7
    It's svchost, so go to Services, Right-Click, Go To Process to find the right svchost to terminate. – Travis Watson Aug 21 '13 at 17:26
  • 3
    This is a better solution and doesn't need restart. – nima Oct 10 '13 at 21:09
  • 3
    It's w3wp.exe in my case. – yazanpro May 19 '16 at 22:15
  • My services list says W3SVC is "being terminated" ... for half an hour ... it doesn't allow me to perform any actions on it. – O. R. Mapper Aug 16 '16 at 10:22
  • Ok, solved this with the help of [this answer](http://stackoverflow.com/a/6297173/1430156), as described in [my question/answer](http://serverfault.com/questions/796911/how-to-repair-iis-when-it-loses-its-configuration/797091). – O. R. Mapper Aug 16 '16 at 10:38
  • I go to task manager>service and find the W3SVC, then right click and "Go to process" and kill the svchost highlighted. then iisreset. It works without restart. – Sharon Mar 10 '17 at 13:40
23

I found the solution:

  1. Run -> appwiz.cpl -> Turn windows features on or off -> Uncheck "Internet Information Services" and "Windows Process Activation Service"

  2. Restart your machine.

  3. Run -> appwiz.cpl -> install both "Internet Information Services" and "Windows Process Activation Service"

Reference

Arjan
  • 30,974
  • 14
  • 75
  • 112
Mohammad Dayyan
  • 1,763
  • 11
  • 41
  • 55
18

I came across the same problem. It got solved with following steps:

  1. Go to admin DOS command prompt --
  2. (Ctrl+X) will give the option to go to admin DOS prompt
  3. use command "iisreset"

This will solve the problem.

shA.t
  • 488
  • 4
  • 18
  • Just spent a whole day trying at least 15 "solutions" across the whole of the Stack Exchange and other forums...THANK YOU! This solved it in a blink. – SKidd Apr 13 '22 at 16:42
12
  1. Go to services.msc
  2. Check World Wide Web Publishing Service.
  3. If disabled, right-click change the Startup type to Automatic.
  4. Start the service.
karel
  • 13,390
  • 26
  • 45
  • 52
Srivasta
  • 121
  • 1
  • 2
8

This commonly occurs when port 80 is being used by something else. If this is a dev box, do you also have Apache or Skype installed? These are a common culprit.

You can check if port 80 is in use by running netstat -ab|find "80" in an elevated command prompt. This may take a minute or two to run depending on what network activity is occurring on your PC.

MDMarra
  • 20,442
  • 4
  • 44
  • 54
5

A bit different from Mohammad's solution:

  1. Run -> appwiz.cpl -> Turn windows features on or off -> Check "Windows Process Activation Service"

  2. That's all.

It solved my problem.

pradip
  • 51
  • 1
  • 1
4

The solution to this issue was different for me.

After following the solutions to check that the Window Features where there I was still having the same problem.

The error message was the same and I noticed the Windows Service "World Wide Web Publishing Service" which was set to automatic was not started.

This service was dependent on "Windows Process Activation Service" (You can check dependent services by right clicking > properties > dependent tab)

I received a file/assembly missing error when I tried to manually start "Windows Process Activation Service". According to this blog the apppools folder had gone missing. Like the author of that page I have no idea what caused it to disappear...security software?

I added the directory c:\inetpub\temp\apppools and started the services in the correct order. Both are now set to automatic and all work fine.

sealz
  • 2,264
  • 2
  • 28
  • 41
  • This is actually the only solution which worked for me! And yes it all worked before, but needed to disable the services for Xamp. – Henk-Martijn May 17 '16 at 14:48
3

I had this issue because I forgot I was debugging the w3svc process in Visual Studio when working on a website, and I was paused at a breakpoint. :P

1

You should check to see that all of the following services are started, or at the very least, not disabled: HTTP, Windows Process Activation Service, DCOM Process Launcher, and RPC Endpoint Mapper.

You should also verify t hat no other process is listening on port 80. The simplest way to do this is to issue the following in a command window:

netstat -a -o|findstr 80
BillP3rd
  • 6,393
  • 2
  • 30
  • 39
  • With the default settings **Skype** also uses ports 80 and 443 as an alternative for incoming connections. Check whether this is enabled in the advanced->connection settings if you have installed Skype. – Andreas Aug 16 '10 at 21:05
  • 1
    I've checked port 80 via the command that you wrote , this is the result => http://www.picfront.org/d/7Mdg – Mohammad Dayyan Aug 17 '10 at 00:34
  • 1
    BTW, I don't have `Skype` – Mohammad Dayyan Aug 17 '10 at 00:35
  • 1
    I've checked the services that you wrote, I don't have a service with `HTTP` name. `DCOM Process Launcher` and `RPC Endpoint Mapper` are started but `Windows Process Activation Service` is in Manual mode and it didn't start. When I wanted to start it this error has occurred : http://www.picfront.org/d/7MeM – Mohammad Dayyan Aug 17 '10 at 00:41
  • 1
    This should help: http://www.hanselman.com/blog/FixedWindowsProcessActivationServiceWASIsStoppingBecauseItEncounteredAnError.aspx The short answer is to check for a folder called C:\inetpub\temp\appPools. If it doesn't exist, create it. Also: http://technet.microsoft.com/en-us/library/cc734935(WS.10).aspx – BillP3rd Aug 17 '10 at 03:01
1

I had a similar issue. In my case, World Wide Web Publushing Service (W3SVC) service was disabled. Run services.msc, right-click on World Wide Web Publushing Service, then click Properties and select "Automatic" as startup type. Now start IIS again.

ivorytux
  • 11
  • 1
1

I was having the same issue, and followed all the steps described here.... However, nothing seems to worked.

The error in the event manager I was getting while trying to run "Windows Process Activation Service" service manually was stating that http service was not found or disabled. Moreover, we were not able to find http service in services list.. so wasn't sure how to enable it.

Here is the error I was getting

The World Wide Web Publishing Service service depends on the HTTP service which failed to start because of the following error: 
The service cannot be started, either because it is disabled or because it has no enabled devices associated with it.

Finally I got it fixed using following command in command prompt.

sc config http start= auto

Then, just started "Windows Process Activation Service" and IIS is now running fine.

Credit goes to the original answer given here: How to re-install http windows service by MajidTaheri

Hoping this helps someone with the same issue...

Krunal
  • 111
  • 3
0

After upgrading from Server 2010 to 2012 R2 I had the same issue. I followed the advice above with the additional steps.

From elevated command prompt:

sc config http start = auto
net start w3svc

Refreshed the WSUS website in IIS manager and restarted and things were good.

Burgi
  • 6,493
  • 14
  • 39
  • 52
Matt
  • 1
0

Similar problem when attempting to start the service from Powershell:

Start-Service -Name W3SVC 

Start-Service: Service 'World Wide Web Publishing Service (w3svc)' cannot be started due to the following error: Cannot open 'w3svc' service on computer '.'

The problem was resolved when I restarted PowerShell as Administrator. Not sure how IIS Admin handles but the error seemed similar enough.

Jacques
  • 143
  • 7
0

For me the following simple step fixed the issue:

Go to task manager and find and end any "IIS worker Process".

S Nash
  • 393
  • 2
  • 7
  • 15
0

Just rebooted the server. It was fine then. The service was stuck trying to come down after I made some IIS changes.

jim
  • 1