MVC3 Connection String Issue
Posted on 2011-03-22
I have created a web application using MVC3 and .NET4 and SQL Server 2008. Everything works good if i run it locally on my machine. But i try to connect to our development database (SQL Server 2008 with Compatibility set to 2008) i keep getting error :
If i make my connection string as
<add name="OFREntities" connectionString="metadata=res://*/OFR.csdl|res://*/OFR.ssdl|res://*/OFR.msl;provider=System.Data.SqlClient;provider connection string="Integrated Security=true;Initial Catalog=MA;Data Source=DEV50SQL;Persist Security Info=True;User ID=MASTool_User;Password=admin;MultipleActiveResultSets=True"" providerName="System.Data.EntityClient" />
Error i get :
Login failed. The login is from an untrusted domain and cannot be used with Windows authentication.
If i make Integrated Security=false in above connection string i get following error :
System.InvalidOperationException: There is already an open DataReader associated with this Command which must be closed first.
Im confused, Can anyone help me out with this?