Sometimes the Error Message Says It All...

Sometime ago I was working on a Web Application Project in Visual Studio 2008. The web site I was working on couldn't run against the built-in web development server, so I ran the application against IIS 7 on my Windows Vista machine (IMO, that's probably the best reason to upgrade to Windows Vista if you are a web developer: multiple web sites in IIS 7).

Life was good until I started debugging...

As soon as I hit F5, I got the following error message:

Error message saying: The local IIS URL specified for Web project MyProject has not been configured. To keep these settings you need to configure the virtual directory. Would you like to create the virtual directory now?

I was a bit surprised as I wasn't using a VD, but a root-based web site. I had debugged IIS web sites under Vista many times before and never ran into this problem.

Naturally, pressing Yes didn't solve the problem, and neither did pressing No. In 90% of the cases (and especially so on Vista) these type of errors are related to security, so I went ahead and checked the following:

  • Integrated Security was turned on for the web site.
  • The NTFS settings for the underlying folder were fine.
  • I was running Visual Studio 2008 as an Administrator as that is a requirement for debugging IIS with UAC turned on.
  • On the project's properties debugging was turned on, the URL was OK, the project was in Debug and not Release mode and so on.
  • Many many things more....

I spent way too long trying to figure out what was wrong before it finally hit me: maybe the error message had it right after all? Maybe there was no I opened up the IIS Manager, found my site and looked at the host headers:

IIS Showing a different host header.

Although the site was named, the actual host header was set to IIS couldn't find the right site, and instead gave me a correct error message.

So, next time you run into a debug error, make sure you are really debugging the site that you think you are debugging... ;-)

Where to Next?

Wonder where to go next? You can post a comment on this article. You can read existing comments below or you can post a comment yourself on this article .

Consider making a donation
Please consider making a donation using PayPal. Your donation helps me to pay the bills so I can keep running Imar.Spaanjaars.Com, providing fresh content as often as possible.

Talk Back! Comment on Imar.Spaanjaars.Com

I am interested in what you have to say about this article. Feel free to post any comments, remarks or questions you may have about this article. The Talk Back feature is not meant for technical questions that are not directly related to this article. So, a post like "Hey, can you tell me how I can upload files to a MySQL database in PHP?" is likely to be removed. Also spam and unrealistic job offers will be deleted immediately.

When you post a comment, you have to provide your name and the comment. Your e-mail address is optional and you only need to provide it if you want me to contact you. It will not be displayed along with your comment. I got sick and tired of the comment spam I was receiving, so I have protected this page with a simple calculation exercise. This means that if you want to leave a comment, you'll need to complete the calculation before you hit the Post Comment button.

If you want to object to a comment made by another visitor, be sure to contact me and I'll look into it ASAP. Don't forget to mention the page link, or the QuickDocId of the document.

For more information about the Talk Back feature, check out this news item.