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.



October 21st, 2008 at 9:36 am
Thank you for posting this tip. This really saved my day.
October 21st, 2008 at 8:55 pm
Deleting “VSWebCache\” worked for me. Thank you.
April 14th, 2009 at 12:42 am
Thanks, really great tip. Deleting “VSWebCache\” worked for me.
August 24th, 2010 at 5:47 am
Deleting “VSWebCache” worked for me.