Q

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:

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

So for MyApp, it would be:

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

This was first published in December 2003

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.

You will be able to add details on the next page.

0 comments

Oldest 

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to:

-ADS BY GOOGLE

SearchCloudComputing

SearchSoftwareQuality

SearchSOA

TheServerSide

SearchCloudApplications

Close