我有兩個單獨的數據庫(我自己的數據庫和身份表)。 我的web配置琴絃的樣子:IIS和MVC5身份2.0
<add name="DefaultConnection" connectionString="Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|aspnet-MVC-20160209053715.mdf;Integrated Security=True;User Instance=True"
providerName="System.Data.SqlClient" />
<add name="CVJobOnlineEntities" connectionString="metadata=res://*/Model1.csdl|res://*/Model1.ssdl|res://*/Model1.msl;provider=System.Data.SqlClient;provider connection string="data source=STEFAN-PC\SQLEXPRESS;initial catalog=CVJobOnline;User Id=DB_9F4064_CVJobOnline_admin;Password=pass123;MultipleActiveResultSets=True;App=EntityFramework"" providerName="System.Data.EntityClient" />
我可以登陸頁面等。但是,當我想要做的登錄,它不能找到默認康恩通過IIS訪問我的網站 - 身份表明顯。
我有這樣的錯誤:
Cannot create file 'D:\AdeccoCVPMIv2\App_Data\aspnet-MVC-20160209053715.mdf' because it already exists. Change the file path or the file name, and retry the operation. CREATE DATABASE failed. Some file names listed could not be created. Check related errors. Thanks.
沒有厚顏無恥,但您是否讀過錯誤消息「無法創建文件」D:\ AdeccoCVPMIv2 \ App_Data \ aspnet-MVC-20160209053715.mdf'**,因爲它已經存在。「**。錯誤告訴你,數據庫文件「aspnet-MVC-20160209053715.mdf」無法創建,因爲它已經存在。 – Kev