More in this section
Forums / General Discussions / Invalid provider name "Default" for SitefinityMembershipProvider specified in web.config

Invalid provider name "Default" for SitefinityMembershipProvider specified in web.config

The forums are in read-only mode. In case that you want to directly contact the Progress Sitefinity team use the support center. In our Google Plus group you can find more than one thousand Sitefinity developers discussing different topics. For the Stack Overflow threads don’t forget to use the “Sitefinity” tag.
1 posts, 0 answered
  1. zee
    zee avatar
    3 posts
    Registered:
    18 Mar 2012
    01 May 2012
    Link to this post
    **Invalid provider name "Default" for SitefinityMembershipProvider specified in web.config file. The name should match one of the providers configured in Sitefinity's Security.config configuration.**

    I am trying to use sitefinity membership in my asp.net web application to validate users.
    I have a sitefinity database with users and roles. Membership is working in sitefinity project but its not working in external website.

    I copied all the DLL's from bin folder and all files in App_Data/Sitefinity/Configuration to external asp.net web application.

    Also added Provider in web.config

          
          <membership defaultProvider="Default">
          <providers>
            <clear/>
            <add name="Default" type="Telerik.Sitefinity.Security.Data.SitefinityMembershipProvider, Telerik.Sitefinity"/>
            <add name="AspNetSqlMembershipProvider" type="System.Web.Security.SqlMembershipProvider" connectionStringName="ApplicationServices"
                 enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="false" requiresUniqueEmail="false"
                 maxInvalidPasswordAttempts="5" minRequiredPasswordLength="6" minRequiredNonalphanumericCharacters="0" passwordAttemptWindow="10"
                 applicationName="/" />
          </providers>
          </membership>
           
    In the SecurityConfig configuration file also added Membership section


         <membership defaultProvider="Default">
        <providers>
        <clear/>
        <add name="Default" type="Telerik.Sitefinity.Security.Data.SitefinityMembershipProvider, Telerik.Sitefinity"/>
        </providers>
        </membership>

    In the login button click event i am trying to use

       
                System.Web.Security.MembershipProvider mp =     System.Web.Security.Membership.Providers["default"];
                var rtn = mp.ValidateUser("admin", "123456");

                if (rtn)
                {
                    Telerik.Sitefinity.Security.UserManager um = Telerik.Sitefinity.Security.UserManager.GetManager();
                    var user = um.GetUser(Model.Username);
                }

     to validate the user but it throws error.


    **Source code Link** :http://www.mediafire.com/?luo87fxigvx4amd
1 posts, 0 answered