• Home
  • ASP.NET
  • JavaScript
  • SQL
  • WebService
  • OOPs
  • Jquery
  • GridView
  • MVC

Tuesday, February 9, 2016

Recreate the default website in IIS

 Unknown     9:58 PM     No comments   

  1. open IIS Manager
  2. right click Sites node under your machine in the Connections tree on the left side and click Add Website
  3. enter "Default Web Site" as a Site name
  4. set Application pool back to DefaultAppPool!
  5. set Physical path to %SystemDrive%\inetpub\wwwroot
  6. leave Binding and everything else as is
Possible issues:
  1. If the newly created web site cannot be started with a message:
    "Internet Information Services (IIS) Manager - The process cannot access the file because it is being used by another process. (Exception from HRESULT: 0x80070020)"
    ...it's possible that port 80 is already assigned to another application (Skype in my case :). You can change binding port to e.g. 8080 by right clicking Default Web Site and selecting Edit Bindings... and Edit.... See Error 0x80070020 when you try to start a Web site in IIS 7.0 for details.
  2. Some applications require Default Web Site to have an ID 1. In my case it had ID 1 after recreation. If it's not your case, see Re-create “default Website” in IIS after accidently deleting. It's different for IIS 6 and 7.

Note: I had to recreate Default Web Site, because I wasn't able to even open a project configured to run under IIS in Visual Studio. I had a solution with couple of projects inside. One of projects failed to load with an error message:
"The Web Application Project is configured to use IIS. The Web server 'http://localhost:8080/' could not be found."
After I have recreated Default Web Site in IIS Manager, I was able to reload and open that specific project.
  • Share This:  
  •  Facebook
  •  Twitter
  •  Google+
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 comments:

Post a Comment

Popular Posts

Pages

  • Home
  • SQL
  • Asp-Net
  • GridView
  • Javascript
  • What are HttpHandlers and HttpModules in ASP.NET?

Blog Archive

  • March 2016 (12)
  • February 2016 (16)

Contact Form

Name

Email *

Message *

Followers

Follow us

  • Facebook
  • Twitter
  • Instagram
  • Pinterest
  • Bloglovin
  • Youtube

Copyright © Code Wrapper | Powered by Blogger
Design by Hardeep Asrani | Blogger Theme by NewBloggerThemes.com | Distributed By Gooyaabi Templates