Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

5
  • Would i be correct in thinking that if i change the connection string for the default connection to a SQL Server the tables will be auto created. Or will i have to create the structure prior to amending the connection? Commented Oct 14, 2013 at 12:38
  • The connection string used by SimpleMembership is specified as the first parameter in the WebSecurity.InitializeDatabaseConnection method. If you have not changed the code generated by the Internet template it is called in the InitializeSimpleMembershipAttribute located in the Filters folder. Find the name of the connection string and modify that connection string to point wherever your SQL Server is located. If the database is not present when the InitializeDatabaseConnection method is called then EF will automatically create it for you. Commented Oct 14, 2013 at 12:53
  • Ive changed the connection string. When i publish now i get the error **Unable to find the requested Unable to find the requested .Net Framework Data Provider. It may not be installed.] WebMatrix.Data.DbProviderFactoryWrapper.CreateConnection(String connectionString) +32476 ** Commented Oct 15, 2013 at 14:45
  • Ive checked my IIS8 application pool and its using the default pool and .net 4.5 is installed. My connection string is now <add name="DefaultConnection" connectionString="metadata=res://*/Models.mvcdevModels.csdl|res://*/Models.mvcdevModels.ssdl|res://*/Models.mvcdevModels.msl;provider=System.Data.SqlClient;provider connection string=&quot;data source=SAM;initial catalog=MVC_Development;user id=;password=;multipleactiveresultsets=True;application name=EntityFramework&quot;" providerName="System.Data.EntityClient" /> Commented Oct 15, 2013 at 14:49
  • You are using a connection string for model-first or database-first and you probably do not have the configuration settings to use an Entity Client. Your config string should be something like this: <add name="DefaultConnection" connectionString="Server=MyServerName;Database=MyDbName;Trusted_Connection=True;" providerName="System.Data.SqlClient" /> Commented Oct 15, 2013 at 15:01