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: visual studio
I couldn’t open my web project in asp.net 2003.This tells the following error.
Unable to open web projects.the file path “c:\projects\test” does not correspond to the url path “http:\\localhost”. The two need to map the same server location.HTTP error 404 not found.
Comment by Jaikumar — June 27, 2006 @ 2:06 pm
Hi, what do u mean by mapping to IIS? Can u explain more in details please. Thanks
Comment by maw — July 13, 2006 @ 2:30 am
The same actually is with .htm extensions.
I’ve added htm extension to the mappings and couldn’t load the project. So need to remove extension from mappings, open the project and then add the extension.
to maw:
Mappings mean IIS->Properties->Configuration->Mappings
(for IIS 5.x)
Comment by Alex — July 19, 2006 @ 11:51 am
Amazing guys, thanx a lot.
I could not understand why this is happended. Now if is fix it!!!!
Cheers
Comment by Mao — September 8, 2006 @ 7:23 am