- open IIS Manager
- right click Sites node under your machine in the Connections tree on the left side and click Add Website
- enter "Default Web Site" as a Site name
- set Application pool back to DefaultAppPool!
- set Physical path to %SystemDrive%\inetpub\wwwroot
- leave Binding and everything else as is
Possible issues:
- 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.
- 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.
0 comments:
Post a Comment