我部署了C#應用程序並創建了安裝程序。安裝程序被成功創建,但試圖啓動它拋出了以下錯誤的應用程序時:在app.config中啓動應用程序時發生數據庫錯誤
An attempt to attach an auto-named database for file CampusPointe.mdf failed. A database with the same name exists, or specified file cannot be opened, or it is located on UNC share.
連接字符串如下:
<connectionStrings>
<add name="App_Key_Management.Properties.Settings.VendorKeyConnectionString1"
connectionString="Data Source=.\SQLEXPRESS;AttachDbFilename="C:\Program Files\Vendor Key Management\VendorKey.mdf";Integrated Security=True;Connect Timeout=30;User Instance=True"
providerName="System.Data.SqlClient" />
</connectionStrings>
任何幫助,將不勝感激。
問候, 斯里蘭卡
CampusPointe.mdf?該文件在哪裏出現? – deutschZuid
主數據庫文件存儲在* .mdf文件中。您是否在Windows Server 2008上安裝了SQL Server Express?當你完成安裝時,你是否在網絡共享文件夾中保存了一些文件? – MacGyver