What would be equivalent web.config configuration for “enableSimpleMembership”="true:

前端 未结 1 516
旧巷少年郎
旧巷少年郎 2021-01-14 11:25

What would be equivalent configuration of Membership and Role providers in Web.Config for:


  

        
相关标签:
1条回答
  • 2021-01-14 11:54

    Equivalent configuration of web.config would be:

    <appSettings>
      <add key="enableSimpleMembership" value="false" /><!-- false is default if key is not present -->
    </appSettings>
    <connectionStrings>
      <add name="DefaultConnection" connectionString="..." providerName="System.Data.SqlClient" />
    </connectionStrings>
    <system.web>
      <membership defaultProvider="SimpleMembershipProvider">
        <providers>
          <add name="SimpleMembershipProvider" type="WebMatrix.WebData.SimpleMembershipProvider" />
        </providers>
      </membership>
      <roleManager defaultProvider="SimpleRoleProvider" enabled="true">
        <providers>
          <add name="SimpleRoleProvider" type="WebMatrix.WebData.SimpleRoleProvider" />
        </providers>
      </roleManager>
    </system.web>
    
    0 讨论(0)
提交回复
热议问题