Tim Huffam

Dotting the I and crossing the T of I.T.

  Home  |   Contact  |   Syndication    |   Login
  153 Posts | 0 Stories | 2747 Comments | 653 Trackbacks

News

Archives

Post Categories

Interesting Blogs/Links

I got this error (and serveral variations of it while trying to fix it) when trying to open an ASP.NET (.Net 1.1) web app in VS.NET (2003) (on an XP Pro box):

Unable to open Web Project 'TestW'. The file path 'C:\inetpub\wwwroot\TestW' does not correspond to the URL 'http://Localhost:/TestW'.  The two need to map to the same server location.  HTTP Error 403: Access Forbidden

This was caused by two problems:

  1. I had added a certificate to the server (IIS 5) - and the cert specified my full machine domain name.
  2. I had changed the web app's security setting to 'Require secure channel (SSL)'.

To resolve this I had to do the following:

  1. Remove the offending web app project from the VS.NET solution & save the solution.
  2. Using a test editor (eg Notepad), open the .webinfo file of the offending project (eg C:\Inetpub\wwwroot\TestW\TestW.csproj.webinfo).
  3. Update the 'URLPath' attribute of the 'Web' element to use the full host name (required for cert) and to use https (required for SSL) eg:
    Replace this:
    <Web URLPath = "http://localhost/TestW/TestW.csproj" />
    With this:
    <Web URLPath = "https://iblongsw70991.gb.ad.drkw.net/TestW/TestW.csproj" />
  4. Save the webinfo file.
  5. Within VS.Net, right-click on the solution and select Add - Existing Project From Web....
  6. Enter the new URL, identical to what you just saved in the webinfo file.  Eg:  
    https://iblongsw70991.gb.ad.drkw.net/TestW/TestW.csproj
  7. Save it all and cross your fingers ;-)

HTH

Tim

posted on Thursday, September 8, 2005 12:16 PM

Feedback

# re: Unable to open Web Project '...'. The file path '...' does not correspond to the URL '...'. The two need to map to the same server location. HTTP Error 403: Access Forbidden 9/20/2005 7:11 AM lavanya
Hi tim,

That was a good "on the trivia" article. Saved me a lot of time. Thanks.

Cheers

Lavanya

# re: Unable to open Web Project '...'. The file path '...' does not correspond to the URL '...'. The two need to map to the same server location. HTTP Error 404: Not found 10/19/2005 5:09 AM Sarath
Hi !
can anyone solve this...its a Error 404 and iam not able to open the solution at all to find the web.config file

# re: Unable to open Web Project '...'. The file path '...' does not correspond to the URL '...'. The two need to map to the same server location. HTTP Error 403: Access Forbidden 3/2/2006 12:45 PM ag
EXCELLENT!! I worked great. I wanted to know this so that I can open different versions of the same project. Otherwise if you create project1 and project2 in IIS, but the both map to project1, you will not be able to open project2. The error shows up. This fix is great! Thank you for posting

# re: Unable to open Web Project '...'. The file path '...' does not correspond to the URL '...'. The two need to map to the same server location. HTTP Error 403: Access Forbidden 4/21/2006 2:15 PM Austin
This article offers another solution:
http://www.mredkj.com/vbnet/UnableToOpenWebProject.html

# re: Unable to open Web Project '...'. The file path '...' does not correspond to the URL '...'. The two need to map to the same server location. HTTP Error 403: Access Forbidden 6/20/2006 3:46 AM R K Vijay
Hi !
can anyone solve this...its a Error 404 and iam not able to open the solution at all to find the

regarda
vijay rk

# re: Unable to open Web Project '...'. The file path '...' does not correspond to the URL '...'. The two need to map to the same server location. HTTP Error 403: Access Forbidden 6/20/2006 7:17 AM Camb
Read this, it works for me. I do need to delete the sln thou.

http://www.mredkj.com/vbnet/UnableToOpenWebProject.html

# re: Unable to open Web Project '...'. The file path '...' does not correspond to the URL '...'. The two need to map to the same server location. HTTP Error 403: Access Forbidden 10/5/2006 5:59 AM Rajyalakshmi
After trying this also i am unable to add the project . Please help me ASAP.

# re: Unable to open Web Project '...'. The file path '...' does not correspond to the URL '...'. The two need to map to the same server location. HTTP Error 403: Access Forbidden 10/5/2006 1:49 PM Dan
If you're using SBS 2003, this is your problem: You need to add .tmp as a mime type.

http://www.dotnetcoders.com/web/Articles/ShowArticle.aspx?article=57

# Unable to open Web Project '...'. The file path '...' does not correspond to the URL '...'. The two need to map to the same server location. HTTP Error 404: Object Not found 11/12/2006 3:49 AM Mahmod
hi, still i can not solve this problem. can anyone send me a reply please.


# re: Unable to open Web Project '...'. The file path '...' does not correspond to the URL '...'. The two need to map to the same server location. HTTP Error 403: Access Forbidden 11/12/2006 6:59 PM Tim Huffam
Hi Mahmod

There could be a heap of problems that cause this - I think the easiest way around it is to create a new solution and ASP.NET project - then just simply copy the files across from the original.

Let me know how you get on.

Cheers
Tim

# re: Unable to open Web Project '...'. The file path '...' does not correspond to the URL '...'. The two need to map to the same server location. HTTP Error 403: Access Forbidden 2/15/2007 9:26 AM swatantra
the webserver reported following error when attempting to create or open the web project located at the follwoing url:http:''//localhost/webapplication1'. the server returned an invalid or unrecognized error

I am getting this error
does anybody has solution to this problem...


# My problem 2/15/2007 9:27 AM swatantra
the webserver reported following error when attempting to create or open the web project located at the follwoing url:http:''//localhost/webapplication1'. the server returned an invalid or unrecognized error

# re: Unable to open Web Project '...'. The file path '...' does not correspond to the URL '...'. The two need to map to the same server location. HTTP Error 403: Access Forbidden 2/23/2007 9:47 AM Alex
Delete your cache from C:\Documents and Settings\[User Name] - that usually solves the problem (although you might want to backup your code somewhere else first).

# re: Unable to open Web Project '...'. The file path '...' does not correspond to the URL '...'. The two need to map to the same server location. HTTP Error 403: Access Forbidden 3/15/2007 12:03 PM sid
Hi Tim,

Great solution man. Thanks a lot.

# re: Unable to open Web Project '...'. The file path '...' does not correspond to the URL '...'. The two need to map to the same server location. HTTP Error 403: Access Forbidden 4/10/2007 2:46 AM greg chow
try turning off windows firewall!!!or allowing your web address, worked for me

# Connecting to the server unable to open 7/6/2009 12:20 PM Baskar
I bought one dot net books and in that, the source code cd was attached. I am trying to open that file it will display the following error message,

Connecting to the server and check the proxy setings and the path. What is the reason? how can i open and run that project?


Post A Comment
Title:
Name:
Email:
Comment:
Verification: