Geeks With Blogs
mikedopp Geekswithblogs (edition)

I being a very intelligent web developer (This is true). Decided it might be fun to delete the Default Web Site in IIS6.0 not thinking much of it. Of course it wouldn't have mattered at all, at least until I decided to install commerce server 2007 enterprise on the production server that I had deleted the Default Web Site.

Why was this a problem you ask? Wow good question. Here's the long and short of it.

When installing Microsoft Commerce Server 2007 sp1 you can get about oh I'd say 5 minutes into the install until you get to Web Site configuration settings. You put your user name in the little sign in box as well as your password like any good little wizard following monkey. Then terror err I mean error strikes you. The error says hey idiot I cannot find your "Default Web Site" you cannot continue. Well gall darn you say I will just right click on the web site folder and create a new web  site called "Default Web Site". Ah doesn't that feel better? You say to the Monkey wizard (Commerce Server 2007 sp1 config wizard). No says the error again. So you jump up and down screaming at the server. What the brown bananas do you mean its right there!

Well turns out that there is a super er... uber  secret metadatabase that keeps a ID stored for every site created and the one you just created "Default Web Site" is W3SVC/890987799887.... on and on for about 6 more decimals. Problem is Windows likes the "Default Web Site" to be W3SVC/1. What do you do? Uninstall IIS? Holy foolish that would be.

Try this before moving on.

There is a fun little vb script built just for this occasion. "adsutil"! Remember it and love it.

First we need to make sure there for whatever reason isn't a W3SVC/1 already there ( I know you are saying: but the story you took me down this long path and....) No worries its always good to dot your T's and Cross your I's or is that wrong too?

Go to your nearest command prompt.

make sure you are at the root of C:\

cd\Inetpub\AdminScripts

once there run this: cscript adsutil.vbs enum w3svc/1

If it comes back with "path requested could not be found" you know your hosed.

Try this: cscript adsutil.vbs enum w3svc

All kinds of data will fly by and the world will turn upside down (unless you are in Australia. However if you are there you are smart enough not to delete the web site in the first place.).

You should get: w3svc/Info w3svc/Filters and at least one w3svc/### where the number is the interesting part.

To find your new default web site number will take some looking up. Hunt by using this: cscript adsutil.vbs enum w3svc/### putting the numbers you saw in the list.

Ok the good part.

Create the new W3SVC/1

     cscript adsutil.vbs create_vserv W3SVC/1

Copy it

    cscript adsutil.vbs copy W3SVC/### W3SVC/1

Set It

    cscript adsutil.vbs set w3svc/1/ServerComment "Default Web Site"

So now you have a new Default Web Site and you now know not to delete it again or there will be consequences.

 

 

 

Posted on Friday, March 14, 2008 8:05 AM | Back to top


Comments on this post: Windows Server 2003 - IIS6.0 Do not delete the Default Web Site!

# re: Windows Server 2003 - IIS6.0 Do not delete the Default Web Site!
Requesting Gravatar...
You are a life saver. Well documented and easy to follow steps.

Thanks
Left by Patrick on Aug 24, 2008 6:51 AM

# re: Windows Server 2003 - IIS6.0 Do not delete the Default Web Site!
Requesting Gravatar...
awesome. this saved my life dude. not only did it help (a lot) but it was funny to read, i like your writing style.

now, all i need to do is reconfigure this Default Web Site with the default settings ...

oh, i also had to do one other step, since, after completing your instructions, then i had 2 "default web site"s:

cscript adsutil.vbs delete W3SVC/#### (the previous Default Web Site #)

thanks again
Left by steve on Aug 29, 2008 8:33 PM

# re: Windows Server 2003 - IIS6.0 Do not delete the Default Web Site!
Requesting Gravatar...
Thank you for this quick and easy solution! I really didn't want to have to uninstall IIS and start all over with my server setup! Your steps were really easy to follow, and now I'm all set again. Thank you!!!
Left by Betsy on Jan 31, 2009 12:50 PM

# re: Windows Server 2003 - IIS6.0 Do not delete the Default Web Site!
Requesting Gravatar...
ABSOLUTE LIFESAVER!! Should be prominently flagged, displayed, whatever. Only solution to my problem after 5 days of work & searching. Wonderful. Can't thank you enough!
Left by michael sabiers on Feb 09, 2009 6:32 PM

# re: Windows Server 2003 - IIS6.0 Do not delete the Default Web Site!
Requesting Gravatar...
Michael,
Glad this saved you some time. I remember running into this issue for the first time. Screaming at the server.
-mikedopp
Left by mikedopp on Feb 09, 2009 9:08 PM

# re: Windows Server 2003 - IIS6.0 Do not delete the Default Web Site!
Requesting Gravatar...
I ran into this issue about 4 years ago and it was a nightmare that I learned from. I've been a Web Admin now for 9 years so for any new admins here is a good practice that I have followed since then. On every new Web server I build I always just leave the default Web site alone and usually just stop it and leave it there. Then I just create all new Web sites tailored to my needs. This has worked out awesome I may say for many years now.
Left by Jason Walters on Mar 06, 2009 1:09 PM

# re: Windows Server 2003 - IIS6.0 Do not delete the Default Web Site!
Requesting Gravatar...
Nice style of writing....... :)

I too am a Server Administrator who lves Linux more than windows. :)

Hmm.......... So now I am going to play with IIS. How the hell it could be proud to hold an undeletable website...

I am going to delete "Default Website". It wont make me harm for sure........


as I have your tutorial.... ;)

Thanks a lot dude. :)
Left by Abhilash V.Nair on Jul 30, 2009 1:10 PM

# re: Windows Server 2003 - IIS6.0 Do not delete the Default Web Site!
Requesting Gravatar...
perfect!! Thank you very much!!!
Left by Dragomir on Nov 12, 2009 7:26 AM

# re: Windows Server 2003 - IIS6.0 Do not delete the Default Web Site!
Requesting Gravatar...
I accidently deleted the default website in which my application was deployed. Next I creted it again but this time the the request(ASP pages) takes 30-40 seconds to complete.
I have got another IIS 6.0 machine. When i deployed my application tehre it is running as it was earlier with response time of 30-70 MILLI Seconds.
Left by VIVEK YADAV on May 01, 2010 5:37 AM

Your comment:
 (will show your gravatar)


Copyright © mikedopp | Powered by: GeeksWithBlogs.net