Click here to Skip to main content
15,887,923 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more: , +
Hi All,
I am developing MVC 4 application with Entity framework 6.0(Code First Model) on .Net framework 4.0. I was able to connect sql server using sql server authentication but I am not able to connect sql using Windows authentication.

XML
<add name="ConnectionString" providerName="System.Data.SqlClient" connectionString="Data Source=servername;Initial Catalog=DatabaseName;Integrated Security=True;MultipleActiveResultSets=True" />


I checked logs and I found Eror is "
C#
The underlying provider failed on Open."


if you guys have any idea ..please let us know

What I have tried:

I changed IIS Settings Impersonate to true and sql server configuration settings. but SQL server authentication is working but not windows authentication
Posted
Comments
aarif moh shaikh 19-Feb-16 7:20am    
check your server instance.
John C Rayan 19-Feb-16 8:05am    
You have to switch your SQL authentication to mixed mode (Both SQL and Windows Authentication)
Richard Deeming 19-Feb-16 8:10am    
The only two options are Windows or Mixed. If it was working with SQL authentication, then it's already set to mixed.
John C Rayan 19-Feb-16 8:45am    
Thanks for clarifying Richard.
John C Rayan 19-Feb-16 8:49am    
Did you try with Integrated Security=SSPI because Integrated Security=True may not work with all providers

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900