Reputation: 3852
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'.
Upvotes: 4
Views: 4172
Reputation: 93444
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"/>
Upvotes: 13