1-888-365-2779
+1-888-365-2779
Try Now
More in this section

Forums / General Discussions / Custom Membership Provider based on SQLMembershipProvider

Custom Membership Provider based on SQLMembershipProvider

3 posts, 0 answered
  1. Abraham
    Abraham avatar
    29 posts
    Registered:
    11 Aug 2010
    17 Mar 2011
    Link to this post
    In 3.7 I developed a custom MembershipProvider and a RoleProvider based on the Microsoft SQL providers.  It has worked very well in 3.7.  The providers are in a separate dll.  I've upgraded the dll to .NET 4.0 and I am trying to configure the providers in Sitefinity 4.0 SP1 to no avail.  I added my login control to a page and set the membership provider to my custom provider.  When I tried to login with the custom control, I get this message:

    Could not find the specified membership provider.

    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

    Exception Details: System.Web.HttpException: Could not find the specified membership provider.
    Here are the applicable lines from SecurityConfig.config.
    <roleProviders>
        <add connection="LdapConnection" enabled="True" name="LdapRoles" />
        <add description="" resourceClassId="" type="BusinessLogicWeb.AtlantisRoleProvider" type:type="System.RuntimeType, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" connectionStringName="Atlantis" applicationName="/" enabled="True" name="Atlantis" />
    </roleProviders>
    <membershipProviders>
        <add applicationName="/" connection="LdapConnection" enabled="True" name="LdapUsers" />
        <add description="" resourceClassId="" type="BusinessLogicWeb.AtlantisMembershipProvider" type:type="System.RuntimeType, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" connectionStringName="Atlantis"  applicationName="/" enabled="True" name="Atlantis" />
    </membershipProviders>

    And here's the asp markup:
    <asp:Login runat="server" ID="mainLogin"
                    MembershipProvider="Atlantis" onloginerror="mainLogin_LoginError" 
            >
        </asp:Login>

    What am I doing wrong?  Do I have to configure my providers in web.config?  In many other forum posts, you talk about membership provider features that would be available on release.  Is it feature complete now?  Many others have asked for samples.  Can you provide any?

    Abraham
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    16 Jun 2017
    23 Mar 2011
    Link to this post
    Hi Abraham,

    You need to configure your provider through the configuration section

    Administration >> Settings >> Advanced >> Security.

    Best wishes,
    Ivan Dimitrov
    the Telerik team
  3. Abraham
    Abraham avatar
    29 posts
    Registered:
    11 Aug 2010
    23 Mar 2011
    Link to this post
    The membership provider was based on Microsoft's model, not Telerik's new MembershipDataProvider.  I'm going to wait for the Q1 release which is supposed to include wrappers that will make my MembershipProvider work.

    Abraham.
3 posts, 0 answered