Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

i have published my asp.net MVC 3 web application locally using IIS 7 express and visual developer express 2010, but when i tired to login to the application and after i insert the user name and password on the login view the following error was returned:-

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.

so what might be causing this problme? the current connection string is :-

<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=&quot;Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\MScProject.mdf;Integrated Security=True;User Instance=True;MultipleActiveResultSets=True&quot;" providerName="System.Data.EntityClient" />
share|improve this question

1 Answer 1

Did you try this MSDN thread or this?

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.