Cannot start service W3SVC on computer '.'.

During debugging some code IIS on my PC was hanged and I was on unable to debug the code anymore. Whenever I want to start it, the following error occurs.



To resolve this issue, I did following steps:



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

  • Restart your machine.
  • Run -> appwiz.cpl -> install both "Internet Information Services" and "Windows Process Activation Service"

    During reinstalling of IIS, make sure all the required components and features would be selected to install. After complete installation, register ASP.Net 4.0.
    To register open command promt and do the following.

  • Open your command prompt (Windows + R) and type cmd and press ENTER
    You may need to start this as an administrator if you have UAC enabled.
    To do so, locate the Command Prompt exe, right click and select "Run as Administrator"
  • Type cd C:\Windows\Microsoft.NET\Framework\v4.0.30319\ and press ENTER.
  • Type aspnet_regiis.exe -ir and press ENTER again.
    • If this is a fresh version of IIS (no other sites running on it) or you're not worried about the hosted sites breaking with a framework change you can use -i instead of -ir. This will change their AppPools for you and steps 5-on shouldn't be necessary.
    • at this point you will see it begin working on installing .NET's framework in to IIS for you



  • After finished successfully, now open IIS and ALLOW the restriction of desired ASP.Net.

    After completed these all steps, my issue was resolved and I started my work again. :)

    Comments

    1. Just wanted to say a quick thanks for making this post! Helped me out so much!

      ReplyDelete

    Post a Comment

    Popular posts from this blog

    Data Bound Controls in ASP.Net - Part 4 (FormView and DetailsView controls)

    ASP.net: HttpHandlers

    The Clickjacking attack and X-Frame-Options