Search code examples
asp.netconnection-stringmembership-provideraspnetdb

ASP.net aspnetdb.mdf connection string


After configuring the Membership Provider, I noticed that there is no connection string for ASPNETDB.mdf in my web.config. Shouldn't there be a connection string? What is the appropriate syntax? Thanks in advance!


Solution

  • The default connection string is defined in machine.config:

    <add name="LocalSqlServer" connectionString="data source=.\SQLEXPRESS;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|aspnetdb.mdf;User Instance=true" providerName="System.Data.SqlClient"/>