Ran into this situation with a site installing WBI, but their Default Web Site in their IIS had been deleted a while back. For the benefit of others that may encounter this, wanted to post what happened and how it was resolved:
A. When went to install WBI, received the error:
Internal error: Expression Error 'Runtime error (at 1:661):
B. Noticed that the Default Web Site had been deleted from IIS. But WBI initially needs this there to be able to initially install itself, even if create a virtual site after.
C. Did a search online, and found this great site http://geekswithblogs.net/lorint/archive/2005/12/09/62737.aspx(want to post a link here to give all kudo’s to them) which provides two suggestions for retrieving the Default Web Site without having to reinstall IIS and potentially mess up existing web sites already installed.
**First possible solution is if you have just recently deleted, do the following: " "
- Right-click on the root folder in IIS where the websites exist and choose New>Website(from file…)
- Browse to: \WINDOWS\System32\inetsrv\History
- Choose the newest XML file in the list and choose “Read”
- If “Default Website” exists in the list, choose it and finish.
**Otherwise as outlined on that web page (see for full details)
1.First make sure that there is not a web known as W3SVC/1 as it may have just been renamed.Open a command prompt and type this: " "
c:
cd\Inetpub\AdminScripts
cscript adsutil.vbs enum w3svc/1
If it comes up with “The path requested could not be found” thenthat meansyou don’t have a true default website anymore. If no error then check out the “ServerComment” to know which web the machine now thinks is the default as that is the default now.
2.If there is no default any longer and youwant tocontinue recreating your Default Web Site, run this to find the IDs of any other webs you do have (and you’ll need at least one): " "
cscript adsutil.vbs enum w3svc
A bunch of info will fly past. Look for the folder entries at the end, which start with square brackets. You’ll have w3svc/Info, w3svc/Filters, and hopefully at least one w3svc/### where the number is the interesting thing. If there are more than one then you can find the name of each with: " "
cscript adsutil.vbs enum w3svc/###
(Putting in the ###s that you saw in the list.) Check out the ServerComment property to know its name. Find a numbered web in the list from above that you can use as a template to copy from.
- Use these commands to copy this to a new web with ID 1 now that you know an ID to use as a source (i.e. to copy from): " "
cscript adsutil.vbs create_vserv W3SVC/1
cscript adsutil.vbs copy W3SVC/### W3SVC/1
cscript adsutil.vbs set w3svc/1/ServerComment “Default Web Site”
Note that with the last command there you can actually rename the new web to whatever you want to call it - but by haing it called Default Web Site than you actually know it is the actual Default Web Site. This is the name under which it will appear in the Internet Information Services MMC (aka InetMgr).