Problem solve Get help with specific problems with your technologies, process and projects.

How do I map the file path and URL for my project to the same server?

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:

    <Web URLPath = "[Virtual Directory]/[Project File]" />

So for MyApp, it would be:

    <Web URLPath = "http://localhost/MyApp/MyApp.csproj" />

Dig Deeper on .NET tutorials, guides and quizzes

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.