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



Download: The Developer's Guide to IoT
The IoT world may be exciting, but there are serious technical challenges that need to be addressed, especially by developers. In this handbook, learn how to meet the security, analytics, and testing requirements for IoT applications.
By submitting your personal information, you agree that TechTarget and its partners may contact you regarding relevant content, products and special offers.
You also agree that your personal information may be transferred and processed in the United States, and that you have read and agree to the Terms of Use and the Privacy Policy.
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
Have a question for an expert?
Please add a title for your question
Get answers from a TechTarget expert on whatever's puzzling you.
Meet all of our Microsoft .Net Development experts
Start the conversation
0 comments