Page view counter

Implementing Enterprise Library DAAB with ASP.Net Membership Provider

Last post 05-16-2008 12:50 AM by XiaoYong Dai – MSFT. 1 replies.

Sort Posts:

  • Implementing Enterprise Library DAAB with ASP.Net Membership Provider

    05-14-2008, 5:57 AM
    • Loading...
    • pinoy_roach
    • Joined on 05-14-2008, 9:32 AM
    • Posts 1
    • Points 0

     Guys,

     Have you tried implementing the above subject? I have tried but encountered an error ("Configuration system failed to initialize").

    But if I remove the configSections part, the error is not displayed. 

     

     
    Here is the code at the web.config file:

     

    <system.web>
    <membership>
    <providers>
    <remove name="AspNetSqlMembershipProvider"/>
    <add name="AspNetSqlMembershipProvider" type="System.Web.Security.SqlMembershipProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" connectionStringName="RPTSecurity"
    enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="false" applicationName="/RPT" requiresUniqueEmail="true" passwordFormat="Hashed" maxInvalidPasswordAttempts="3" minRequiredPasswordLength="1" minRequiredNonalphanumericCharacters="0" passwordAttemptWindow="10" passwordStrengthRegularExpression="" />
    </providers>
    </membership>
    <roleManager enabled="true" defaultProvider="AspNetSqlRoleProvider">
    <providers>
    <remove name="AspNetSqlRoleProvider"/>

    <add name="AspNetSqlRoleProvider"
    type="System.Web.Security.SqlRoleProvider" connectionStringName="RPTSecurity"
    applicationName="/RPT" />
    </providers>
    </roleManager>
    </system.web>

    <configSections>
    <section name="dataConfiguration" type="Microsoft.Practices.EnterpriseLibrary.Data.Configuration.DatabaseSettings, Microsoft.Practices.EnterpriseLibrary.Data" />
    </configSections>

    <connectionStrings>
    <add
    name="RPTSecurity"
    providerName="System.Data.SqlClient" connectionString="Data Source=GDI16348;Initial Catalog=aspnetdb;Integrated Security=True;" />
    <add
    name="RPTConnectionString"
    providerName="System.Data.SqlClient" connectionString="Data Source=GDI16348;Initial Catalog=RPT;Integrated Security=True;"/>
    <add name="ASPNetSecurity" connectionString="Data Source=GDI16348;Initial Catalog=aspnetdb;Integrated Security=True;" providerName="System.Data.SqlClient" />
    </connectionStrings>
    <dataConfiguration defaultDatabase="RPTSecurity"/>
      

     

     
     

     

  • Re: Implementing Enterprise Library DAAB with ASP.Net Membership Provider

    05-16-2008, 12:50 AM
    Answer

    Hi

    I tried the given code but get another error "Only one <configSections> element allowed per config file and if present must be the first child of the root <configuration> element."

    As said in above message, you need to move the <configSections> to the first child node of <configuration> element.Hope it helps.

    Best Regards
    XiaoYong Dai
    Microsoft Online Community Support

    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.
Page 1 of 1 (2 items)