我试图用Visual Studio 2010发布一个简单的网站。 我使用Web Deploy。我收到以下错误:问题发布网站ASP.NET 4.0
Error 1 Web deployment task failed.(Object of type 'dbFullSql' and path 'Data Source=.\SQLEXPRESS;AttachDbFilename=c:\documents and settings\tavi\my documents\visual studio 2010\Projects\WebApplication3\WebApplication3\App_Data\aspnetdb.mdf;Integrated Security=True;User Instance=True' cannot be created.)
Object of type 'dbFullSql' and path 'Data Source=.\SQLEXPRESS;AttachDbFilename=c:\documents and settings\tavi\my documents\visual studio 2010\Projects\WebApplication3\WebApplication3\App_Data\aspnetdb.mdf;Integrated Security=True;User Instance=True' cannot be created. Cannot connect to the database 'c:\documents and settings\tavi\my documents\visual studio 2010\Projects\WebApplication3\WebApplication3\App_Data\aspnetdb.mdf'. An attempt to attach an auto-named database for file c:\documents and settings\tavi\my documents\visual studio 2010\Projects\WebApplication3\WebApplication3\App_Data\aspnetdb.mdf failed. A database with the same name exists, or specified file cannot be opened, or it is located on UNC share. 0 0 WebApplication3
我删除使用SQL Server Management Studio的aspnetdb.mdf
文件,我仍然得到这个错误。什么可能是错的?
删除文件通常适用于自动附加问题。你确定你已经删除/删除了DB文件,而不是将它从SQL中分离出来吗? – 2011-02-01 09:11:40