4

I just added a sqlserver connection string. fresh new database. I checked the connection is fine on server explorer.

<add name ="club" connectionString="Data Source=server1;Initial Catalog=temp;Integrated Security=True"/>

Then referenced it in InitializeSimpleMembershipAttribute as follows

WebSecurity.InitializeDatabaseConnection("club", "Users", "UserID", "UserName", autoCreateTables: true);

It works in a sdf file and creates the tables. But fails with sql server. Anyone seen this error before and can explain what is happening?

Error -

Keyword not supported: 'initial catalog'. Exception Details: System.ArgumentException: Keyword not supported: 'initial catalog'.

MoXplod
  • 3,813
  • 6
  • 36
  • 46

1 Answers1

13

Add providerName="System.Data.SqlClient" to your connection string.

<add name="club" 
  connectionString="Data Source=server1;Initial Catalog=temp;Integrated Security=True"
  providerName="System.Data.SqlClient"/>
Erik Funkenbusch
  • 92,674
  • 28
  • 195
  • 291