Quantcast
Viewing latest article 26
Browse Latest Browse All 30

Did you know: How to recreate “Default Web Site” in IIS 7 / 7.5

Many a times you will find people delete the “Default Web Site” and then they install some application which require “Default Web Site”. Now, once you have deleted the Web Site how can you recreate or undelete the Web Site. Not possible unless you have a backup.

Fortunately, there are workarounds in IIS 6 / 7 / 7.5 through which you can recreate the deleted “Default Web Site”. Does that mean you accidentally deleted a working Web Site and you can recreate it, the answer is “NO”. You can only recreate the skeleton and then you will have to configure the Web Site again with all the Virtual Directory’s and Applications. I will show you how you can recreate “Default Web Site” in IIS 6 and then in IIS 7 / 7.5.

In IIS 6.0

  1. Right click on Web Sites folder and click New–> click Web Site…
  2. Under Web Site Description type “Default Web Site” –> click Next
  3. Under IP Address and Port Settings, keep everything as default –> click Next
  4. Under Web Site Home Directory, click Browse and select “C:\Inetpub\wwwroot” –> click Next
  5. Under Web Site Access Permissions, select Read and Run scripts (such as ASP)–> click Next
  6. Click Finish

    Image may be NSFW.
    Clik here to view.
    image11

  7. Now, you have a new “Default Web Site” created but the identity of the Web Site is not 1. Some applications like Microsoft Exchange and Microsoft Office Communications Server requires “Default Web Site” with identity 1.
  8. Open the command prompt as an Administrator
  9. Go to C:\Inetpub\AdminScripts and type cscript adsutil.vbs enum /w3svc
  10. At the very bottom, you will see something like

    [/w3svc/1403756263]
    [/w3svc/998577302]

  11. type cscript adsutil.vbs move /w3svc/998577302 /w3svc/1 and then do IISRESET

    C:\Inetpub\AdminScripts>cscript adsutil.vbs move /w3svc/998577302 /w3svc/1
    Microsoft (R) Windows Script Host Version 5.6
    Copyright (C) Microsoft Corporation 1996-2001. All rights reserved.

    moved from /w3svc/998577302 to /w3svc/1

    C:\Inetpub\AdminScripts>iisreset

    Attempting stop...
    Internet services successfully stopped
    Attempting start...
    Internet services successfully restarted

  12. Refresh IIS Manager and the “Default Web Site” has now the identity 1.

    Image may be NSFW.
    Clik here to view.
    image12

In IIS 7 / 7.5

  1. Right click on Sites folder and click Add Web Site…
  2. Under Site name: type “Default Web Site
  3. Under Application pool: select DefaultAppPool
  4. Under Physical path: “C:\Inetpub\wwwroot
  5. Click OK

    Image may be NSFW.
    Clik here to view.
    image13

  6. Fortunately for me, the “Default Web Site” was created with the ID 1.
  7. But just incase, if in your case the “Default Web Site” does not show ID 1 and if ID 1 is not in use.
  8. Open command prompt as an Administrator
  9. Go to C:\Windows\System32\inetsrv\config and type notepad applicationHost.config
  10. Find “Default Web Site” and change id=”x” to id=”1”.
  11. Save applicationHost.config
  12. Now refresh IIS Manager and start the Web Site.

Hope this helps,
Vivek Kumbhar


Quote of the day:
Love is a snowmobile racing across the tundra and then suddenly it flips over, pinning you underneath. At night, the ice weasels come. - Matt Groening



Viewing latest article 26
Browse Latest Browse All 30

Trending Articles