TD Lemon
TD Lemon

Reputation: 395

Entity Framework Connectionstring

I am using entities with VisualStudio 2010. When I debug my ASP.NET application, it is using the current user identity to connect to the database, and not what is specified in my connection string :

   <connectionStrings>
     <add name="RFV2_Entities" connectionString="metadata=res://*/Model.RFDB.csdl|res://*/Model.RFDB.ssdl|res://*/Model.RFDB.msl;provider=System.Data.SqlClient;provider
 connection string=&quot;data source=xxx\xxx;initial
 catalog=xxx;User Id=xxx;Password=yyy;integrated
 security=True;multipleactiveresultsets=True;App=EntityFramework&quot;"
 providerName="System.Data.EntityClient" />    </connectionStrings>

Do I have to specify something to make my application use the connection string identity ?

Upvotes: 0

Views: 188

Answers (1)

Hans Kesting
Hans Kesting

Reputation: 39255

Specify either "Integrated Security=True" OR "User Id" and "Password", not both.

See this list of keywords, which specifies for "Password":

The password for the SQL Server account logging on. Not used with (the strongly recommended) 'Integrated Security=true' option.

(my emphasis)

Upvotes: 2

Related Questions