Home > DeveloperSection > Forums > Problem in forms authentication
Chintoo Semi

Total Post:135

Points:947
Posted on    August-27-2014 1:27 AM

 ASP.Net
Ratings:


 1 Reply(s)
 609  View(s)
Rate this:

I am using forms authentication in my web site and I defined this in my config.

 Therefore I have an ASPNETDB.MDF. So do I need to have a database called ASPNETDB.MDF in my web host? 

If that is the case then how do I connect this so that my site uses this to verify users? 



Sumit Kesarwani

Total Post:378

Points:2694
Supported
Posted on    August-27-2014 2:49 AM

Hi Chintoo,

<connectionStrings>

<clear />

    <add name="NewConnectionString" connectionString="Data Source=.\SQLExpress;Integrated Security=True;User Instance=True;AttachDBFilename=|DataDirectory|aspnetdb.mdf" providerName="System.Data.SqlClient" />

    </connectionStrings>

<membership>

        <providers>

            <clear/>

            <add name="AspNetSqlMembershipProvider"

                connectionStringName="NewConnectionString"      

                type="System.Web.Security.SqlMembershipProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />

        </providers>

    </membership>


Don't want to miss updates? Please click the below button!

Follow MindStick