我正在尝试使用ASP.NET MVC 3连接我的SQL Server 2008数据库。这是我的连接字符串:
<connectionStrings>
<add name="AppConnectionString"
connectionString="Data Source=(local);Initial Catalog=DatabaseName;User Id=UserName;Password=PassWord;"
providerName="System.Data.SqlClient" />
</connectionStrings>
有什么问题吗?
当我尝试在我的DbContext中查询一些内容时,我会得到这个异常: $exception {"The provider did not return a ProviderManifestToken string."} System.Exception {System.Data.ProviderIncompatibleException}
InnerException {"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)"} System.Exception {System.Data.SqlClient.SqlException}
请问有人能帮我解决一下吗?
谢谢。