我試圖用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