One of the biggest cause of problems with VS.NET 2003 and we projects is its insistence of using IIS. Today, I started getting this error:

Unable to open Web project ‘MyProject’. The file path ‘D:\Projects\MyProject‘ does not correspond to the URL ‘http://Localhost:/MyProject’. The two need to map to the same server location. HTTP Error 404: Not Found

This is one of those annoying errors, because IIS was clearly mapped to the same directory.  My other web projects worked fine, so it was something to do with this specific case.  After some digging around, the problem was found to be caused by mapping the * extension to the ASP.NET runtime.  This appears to stop Visual Studio from being able to load the project file correctly, but in typical Microsoft fashion, we get an error telling us something completely different.

If you are working on projects where you need map all extensions to the ASP.NET runtime, then be warned that this will have an adverse effect on your development environment. The only way to get around it is to remove the mapping, open the project, and then re-add the mapping into IIS.

Tags: