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
By submitting your personal information, you agree that TechTarget and its partners may contact you regarding relevant content, products and special offers.
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 Daniel Cazzulino explains how to load a DSL (domain specific language) domain model instance file programmatically. This requires the .NET type ... Continue Reading
Here we offer a glimpse at 12 of .NET development expert Danny Cazzulino's top ASP.NET questions and answers. Continue Reading
C# developers should NOT be modifying InitializeComponent method in the code-behind (or any of the variable definitions) by hand. Continue Reading
Have a question for an expert?
Please add a title for your question
Get answers from a TechTarget expert on whatever's puzzling you.