我使用Visual Studio Express的2013年網頁,我下面這個教程:http://www.codeproject.com/Articles/791740/Using-AngularJs-ASP-NET-MVC-Web-API-and-EntityFram指定此連接來連接OT分貝:連接到數據庫在Visual Studio Express的2013的Web
<add name="MainDb" connectionString="Server=localhost; Database=SimpleTaskSystemDb; Trusted_Connection=True;" providerName="System.Data.SqlClient" />
但當我運行更新,數據庫我得到這個錯誤:
A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)
,我也完成了其工作正常音樂商店應用和連接有不同:
<add name="MusicStoreEntities" connectionString="Data Source=|DataDirectory|MusicStore.sdf" providerName="System.Data.SqlServerCe.4.0"/>
我嘗試了一個類似的連接字符串,但也沒有工作。
No Entity Framework provider found for the ADO.NET provider with invariant name 'System.Data.SqlServerCe.4.0'. Make sure the provider is registered in the 'entityFramework' section of the application config file.
但是音樂商店app.config文件沒有引用System.Data.SqlServerCe.4.0,但我把它添加到這個應用程序反正後來我回到我原來的錯誤。
任何幫助將不勝感激。
你正在使用哪個版本的sql server, – ProgrammingNinja 2014-11-01 15:06:24
這就是我不確定的。我正在使用Express 2013 for Web的任何版本,但我無法在任何地方找到該信息。當我運行SQLMCD -L我得到這個: 服務器: ; UID:登錄ID =?; PWD:密碼=?; Trusted_Connection:使用集成安全=? * APP:AppName =?; * WSID:WorkStation ID = ?; – Anthony 2014-11-01 15:12:53
請按照我的詳細回答 – ProgrammingNinja 2014-11-01 15:25:24