Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • MR_Cracow 2 posts 22 karma points
    Oct 12, 2011 @ 14:54
    MR_Cracow
    0

    Custom Membership provider - authentication error

    Hi

    I'm using custom membership provider for backend users. The problem is: I can't log in. I'm getting error:

    No User exists with ID -1

    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.ArgumentException: No User exists with ID -1

    Here is my code:

    web.config:

       <membership defaultProvider="Umb" userIsOnlineTimeWindow="15">
           <providers>
            <clear />   
            <add name="UsersMembershipProvider"  type="umbraco.providers.UsersMembershipProvider" enablePasswordRetrieval="false" enablePasswordReset="false" requiresQuestionAndAnswer="false" passwordFormat="Hashed" />   
            <add name="Umb" type="System.Web.Security.SqlMembershipProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" connectionStringName="Umbraco" passwordFormat="Hashed" requiresQuestionAndAnswer="false" requiresUniqueEmail="true" applicationName="umbraco" maxInvalidPasswordAttempts="5" minRequiredPasswordLength="7" minRequiredNonalphanumericCharacters="0" passwordAttemptWindow="10" />
          </providers>

        </membership>

    umbracoSettings.config:

    <providers>
    <users>
    <!-- if you wish to use your own membershipprovider for authenticating to the umbraco back office -->
    <!-- specify it here (remember to add it to the web.config as well) -->
    <DefaultBackofficeProvider>Umb</DefaultBackofficeProvider>
    </users>
    </providers>

    What's wrong with my Custom provide? Thanks for Any help.

    MR

Please Sign in or register to post replies

Write your reply to:

Draft