我有 Visual Studio 2008 并安装了 MVC2 RTM。对于数据库,我有 Sql Server 2008。
当我第一次创建“asp.net mvc web application”类型的项目时,我得到了项目的默认结构和app_data。在我运行项目并尝试注册新用户后,它给出了以下错误。
The user instance login flag is not supported on this version of SQL Server. The connection will be closed.
显示上述消息,而连接字符串值为
<connectionStrings>
<add name="ApplicationServices" connectionString="data source=.;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|aspnetdb.mdf;User Instance=true" providerName="System.Data.SqlClient"/>
</connectionStrings>
当数据源=.\SQLEXPRESS 时出现以下错误
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)
任何想法为什么它没有连接到数据库?
提前致谢。