BizTalk Utilities CV ,   Jobs ,   Code library
 
Go to the front page to continue learning about XML or select below:

Contents

ReBlogger Contents

Previous posts in WSCF/WCF

 
 
Page 2320 of 19542

VS2008 and web application - hostname

Blogger : Geekswithblogs.net
All posts : All posts by Geekswithblogs.net
Category : WSCF/WCF
Blogged date : 2008 Aug 13

Recently I ran into an issue where IIS was refusing to load an otherwise previously perfectly good web application in the solution.
The Visual Studio 2008 solution included a Web Application csproj, and was referencing it by URL on IIS (that is, not a local file based or cassini web project). Attempting to load the solution brought up an error:

The local IIS URL http://localhost/{YourAppName} specified for Web Project {YourAppname} has not been configured.  In order to open this project the Virtual Directory needs to be configured.  Would you like to create the Virtual Directory now?

First, checked the IIS manager and ensured application pool and web site were up and operational. All seemingly well.
Since my web applicaiton was in fact a WCF web service, I first tried to access the WSDL: It worked.  A WSDl was returned, so I knew the web application was operational or at the very least reachable.

Finally I looked more closedly at IIS. Clicking the "Web Sites" folder itself brings up a grid on the right. It shows the web site name, port, IP and state. Sorting by [Port], I noticed several web sites were running on 80. The way it works is that one of them had no host headers at all, and the rest had a host header, thereby distingquishing them from the rest of the web sites on the same port.

Normally, I do this when working on several web applications and wanting to mimic production as closely as possible with out the need for multiple IPs on the dev box. At some point, I installed MOSS and used  the dev box's WINS name (the name of the machine in AD) as the host header name.

The confusion became clear when looking more closely at the WSDL returned. Althogh the IP I used was
http://localhost/{MyAppName} , the wsdl link rendered was
http://MyMachineName/{MyAppName}?WSDL ..
This clued in on the answer:
Created a c:\windows\system32\drivers\etc\hosts entry 127.0.0.1 SomeName for the IIS web site which previously was using the machine name as a hosts header, changed IIS so that the host header for the offending site was using the new entry and things are back to normal.


Read comments or post a reply to : VS2008 and web application - hostname
Page 2320 of 19542

Newest posts
 

    Email TopXML