Fix for: "Unable to get the project file from the Web server" error

If you are a decently experienced .NET Developer who has to deal with ASP.NET/Visual Studio.NET IDE then I’m sure you must have came across an annoying Visual Studio error,

“Unable to get the project file from Web server. Unable to open Web project <projectname>. The file path <path> does not correspond to the URL <URL>. The two need to map to the save server location. HTTP Error 403: Access Forbidden.”

It’s very annoying because it wouldn’t let you open the project file in Visual Studio. This particularly happens when you move an ASP.NET website or web service to a different machine or to a different web host.

So, how do we fix this error?

From the above message it was obvious that it has something to do with the .webinfo file having a wrong mapping. Sometimes it might not be the case. Even if you make sure the IIS Virtual Directory points to the correct local path, recreated IIS application etc. you might still get the same error. Well, no worries, this simple fix would work.

Just delete the virtual directory in IIS and then recreate it again. Restart IIS and bingo, your Visual IDE should play nice with IIS again from now on.

Hope it helps.

PS: If the above solution doesn’t work or deleting the virtual directory is not a choice for you (for whatever reasons) then try this one. Find the “VSWebCache\<ProjectName>” folder under your Documents and Settings folder and delete it and try it again.

Related Posts with Thumbnails


Subscribe to our free RSS feed to keep up with what's happening at DemoGeek.com

At DemoGeek.com we try to explain the tech stuffs in as much detail as we can to help the not-so-tech-savvy of our friends understand and follow the tech stuffs.

Share/Save/Bookmark

Subscribe to DemoGeek.com

4 comments so far

  1. Cynthia
    #1

    Thank you for posting this tip. This really saved my day.

  2. dotnetrules
    #2

    Deleting “VSWebCache\” worked for me. Thank you.

  3. Mohyuddin
    #3

    Thanks, really great tip. Deleting “VSWebCache\” worked for me.

  4. AS Reddy
    #4

    Deleting “VSWebCache” worked for me.

Leave a Reply





XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

About DemoGeek.com

DemoGeek.com brings you high quality articles, tutorials and how to's on everything related to Microsoft Windows, Mac OSX, iPhone, Useful Websites, Browsers, Software and Programming.

At DemoGeek.com you'll find step-by-step explanation of the technical issues explained in detail with screenshots and screencasts. Read More...

Contact |  FUG |  Disclaimer

Creative Commons License

Canonical URL by SEO No Duplicate WordPress Plugin