by jfisch
8. June 2009 18:01
This particular issues appears when you F5 (or Debug->Start Debugging) your web application or website to begin debugging your website and your host header with port number does not match the host header and port number entered in visual studio. The following message appears.

The first step to resolve this issue is to verify the Local IIS Web Server location you're attempting to debug. By right-clicking your project within Visual Studio and click Properties, then navigate to the Web tab of your project properties. You'll notice under the Server section of the interface your selection of Use Local IIS Web server and the coresponding Project Url. It should appear as such:

The solution within IIS 6 is to open IIS Manager within Administrative Tools, right click the website corresponding to the Project Url within Visual Studio and click properties. This particular error implies that your Url is mal-formed. The thing to do is to match the port number you've specified within your Project Url and verify the Host header specified for that port number within IIS.

By clicking the Advanced button

you can click one of the identities in the list and verify that the host header value specified within the IIS matches those within Visual Studio and rectify the if necessary.
HTH,
Jeff