Unable to get the project from the web server. 错误的解决方法

来源:互联网 发布:域名是什么 编辑:程序博客网 时间:2024/05/16 09:59

在XP下配置Dasblog的时候出现的问题, 解决的方法直接引用网上的文章了:
Unless you're a .NET programmer, you should ignore this post. I'm entering it only as a small contribution to Google's search engine for the poor sap who, like me, is beset with the following error message when attempting to open a web project in Visual Studio.NET "Unable to get the project file from the web server". The solution? Delete everything in the c:/documents and settings/VSWebCache directory. I spent four hours spinning my wheels on this issue before finally finding a buried reference on an obscure message board. What a pain in the ass.

查了VSWebCache的作用, 如下:

1VSWebCache作用是为了支持脱机开发ASP.NET Web应用程序。假如你本来在一台WEB服务器进行ASP.NET项目的开发,现在因为某些原因,只能在自己的笔记本电脑上进行脱机开发,这时你就可以利用VS.NETWEB脱机开发功能。在自己的笔记本电脑上打开这个项目,在VS.NET中,选中"项目"=》"Web项目"=》"脱机工作"。这时, VS.NET会将所有项目文件复制到VSWebCache中。这样你就可以在脱机情况下,通过打开VSWebCache中的项目文件来进行开发。当联机时, 选中"项目"=》"Web项目"选择"同步所有文件夹",就可以将脱机开发的内容复制到服务器中。  

2VS.NET使用FrontPage server extensionsgWeb服务器进行通信,VS.NET无法直接修改Web服务器中的文件,所以VS.NETVSWebCache作为一个中转站, 将编辑与编译的文件先放在VSWebCache中,然后通过FrontPage server extensionsg上传到服务器。

具体路径是c:/documents and settings/{User Name}/VSWebCache/{Machine name}/{Project Name}

 

这个错误一般出在您复制一个项目然后再打开的时候,可见,是删除原来项目时,没有删除原来项目的脱机文件,以至于使得.NET 还按原来项目的路径寻找项目所致。