ASP.Net Forms authentication provider issue

Posted by George2 on Stack Overflow See other posts from Stack Overflow or by George2
Published on 2010-05-10T05:43:45Z Indexed on 2010/05/10 5:54 UTC
Read the original article Hit count: 383

Hello everyone,

I am using VSTS 2008 + .Net 3.5 + ASP.Net to develop a simple web application. And I am using Forms authentication for my web site (I use command aspnet_regsql.exe to create a new database in SQL Server 2008 Enterprise to host database for Forms Authentication. I am not using SQL Server Express.).

I am learning Forms authentication from here,

http://msdn.microsoft.com/en-us/library/ff648345.aspx#paght000022_usingthesqlmembershipprovider

my question is for the name of membership defaultProvider, the value must be "SqlProvider"? Or I can use any arbitrary name, for example like this (I replace the value "SqlProvider" to "MyTestSqlProvider")?

<connectionStrings>
  <add name="MySqlConnection" connectionString="Data Source=MySqlServer;Initial Catalog=aspnetdb;Integrated Security=SSPI;" />
</connectionStrings>
<system.web>
...
  <membership defaultProvider="MyTestSqlProvider" userIsOnlineTimeWindow="15">
    <providers>
      <clear />
      <add 
        name="MyTestSqlProvider" 
        type="System.Web.Security.SqlMembershipProvider" 
        connectionStringName="MySqlConnection"
        applicationName="MyApplication"
        enablePasswordRetrieval="false"
        enablePasswordReset="true"
        requiresQuestionAndAnswer="true"
        requiresUniqueEmail="true"
        passwordFormat="Hashed" />
    </providers>
  </membership>

thanks in advance, George

© Stack Overflow or respective owner

Related posts about forms-authentication

Related posts about ASP.NET