This is the error message I get while trying to open a project in ASP.NET:
"Unable to create Web project'yyy'. The file path 'c:inetpubwwwrootyyy' does not correspond to the URL 'http://localhost/yyy'. The two need to map to the same server location.HTTP Error 404: not found
How do I map?
This error may happen when the local URL where the project was initially created does not match the one you gave it when you added it to IIS (either from within IIS with New Virtual Directory or through Windows Explorer Web Sharing). You can "fix" the mapping by adding a file with the full Web project name plus the "webinfo" extension, in the same folder. For example, if your project file is "MyApp.csproj" create a "MyApp.csproj.webinfo" file. It should contain the following code:
<VisualStudioUNCWeb> <Web URLPath = "[Virtual Directory]/[Project File]" /> </VisualStudioUNCWeb> So for MyApp, it would be: <VisualStudioUNCWeb> <Web URLPath = "http://localhost/MyApp/MyApp.csproj" /> </VisualStudioUNCWeb>
Dig Deeper on .NET tutorials, guides and quizzes
Related Q&A from Daniel Cazzulino
Here our experts address how to converti a VB Windows application to a VB .NET Web application. Continue Reading