views:

208

answers:

3

I am currently using Visual Studio 2008 on XP Pro SP3.

Developing against http://localhost/ everything including debugging works fine.

I need a second website on my machine. IIS 5.1 only allows one website at a time so I used the JetStat XP Pro IIS Admin tool to create a second website. This runs by stopping the Default website and starting the other.

I have added the new website name into the Hosts file and mapped to 127.0.0.1.

Websites can be accessed via this address http://NewHostname/VirtualDirectoryName

Projects can be started without debugging (Web Applications & Websites).

However, when I try to debug I get an error: "Unable to start debugging on the web server. An authentication error occurred while communicating with the web server."

Integrated Authentication is enabled in IIS.

I have seen a lot of documentation with many fixes for "unable to start debugging on the web server" errors but they all seem like huge overkill for my problem, after all, debugging works fine provided I'm not doing it on this different hostname. They talk about doing things that I would do if debugging did not work at all even with http://localhost/.

Is there a place where I can just add this new hostname so that VS debugging is allowed? Do I need to change permissions somewhere? I feel like there should be a really simple solution that I'm just overlooking.

+2  A: 

Do yourself a favour and download IIS Admin .NET.

This handy little tool allows you to switch between your websites at a snip - each one will become localhost when activated, and crucially, get you out of this debug debacle.

http://www.codeplex.com/iisadmin

Paul Alan Taylor
Have achieved the same with the tool I'm currently using. Thanks.
tentonipete
+2  A: 

You do have to add the hostname to a value within the registry.. but I can't remember where.

Since you can only have one website running at a time, why don't you just have them all running as 'localhost'? This way you don't have to change any annoying registry settings but you still have your applications running in individual IIS Websites.

No Average Geek
+2  A: 

Here's a description of the problem: http://blogs.msdn.com/webdevtools/archive/2008/08/13/debugging-a-website-with-a-host-header.aspx

And here's the recommended registry workaround: http://support.microsoft.com/kb/896861

Richard Poole
I know it should work, but for some reason in this particular instance it didn't.Used the input from others to circumvent my problem, but believe this is the correct answer to my original question of where to add the host headers.
tentonipete