我已经使用 IIS 7 express 和 visual developer express 2010 在本地发布了我的 asp.net MVC 3 web 应用程序,但是当我尝试登录该应用程序并在登录视图中插入用户名和密码后,返回了以下错误:-
System.Data.SqlClient.SqlException: Failed to generate a user instance of SQL Server due to a failure in impersonating the client. The connection will be closed.
那么是什么原因导致了这个问题?当前的连接字符串是:-
<add name="ApplicationServices" connectionString="data source=.\SQLEXPRESS;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|aspnetdb.mdf;User Instance=true" providerName="System.Data.SqlClient" />
<add name="ElearningEntities" connectionString="metadata=res://*/Models.Elearning.csdl|res://*/Models.Elearning.ssdl|res://*/Models.Elearning.msl;provider=System.Data.SqlClient;provider connection string="Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\MScProject.mdf;Integrated Security=True;User Instance=True;MultipleActiveResultSets=True"" providerName="System.Data.EntityClient" />