Copied to clipboard

Flag this post as spam?

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


  • Tom 713 posts 954 karma points
    Feb 09, 2011 @ 04:37
    Tom
    0

    Login not working??

    Hi guys im using the standard umbraco membership provider... when the user logs in it is trying to redirect to the page specified in the login control.. but in the watch window if i attach umbraco.library.IsLoggedOn is false..

    <asp:Login ID="LoginFormControl" DisplayRememberMe="false" TitleText="" DestinationPageUrl="/members-area" FailureText="Login failed. Please check your email address and password and try again." FailureTextStyle-CssClass="message-label-negative" LoginButtonType="Image" LoginButtonImageUrl="~/images/login-button.gif" runat="server">

    <LayoutTemplate>

    <asp:Panel ID="LoginPanel" CssClass="input-form-wrapper" DefaultButton="LoginButton" runat="server">

    <div class="input-form">

    <fieldset>

    <div class="element">

    <asp:Label ID="UserNameLabel" Text="Email Address" AssociatedControlID="UserName" runat="server" /><br/>

    <asp:TextBox ID="UserName" ValidationGroup="LoginGroup" runat="server" />

    <div class="error">

    <asp:RegularExpressionValidator ID="UserNameRegexValidator" ValidationGroup="LoginGroup" CssClass="message-label-negative"

    ControlToValidate="UserName" Display="dynamic" ErrorMessage="Please enter a valid email address." ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*"

    runat="server" />

    <asp:RequiredFieldValidator ID="UserNameRequiredFieldValidator" CssClass="message-label-negative" ValidationGroup="LoginGroup"

    ControlToValidate="UserName" Display="dynamic" ErrorMessage="Please enter an email address." runat="server" />

    </div>

    </div>

    <div class="element">

    <asp:Label ID="PasswordLabel" Text="Password" AssociatedControlID="Password" runat="server" /><br/>

    <asp:TextBox ID="Password" TextMode="Password" ValidationGroup="LoginGroup" runat="server" />

    <div class="error">

    <asp:RequiredFieldValidator ID="PasswordRequiredFieldValidator" CssClass="message-label-negative" ValidationGroup="LoginGroup"

    ControlToValidate="Password" Display="dynamic" ErrorMessage="Please enter your password." runat="server" />

    </div>

    </div>

    </fieldset>

    </div>

    <div class="error">                         

                                   <asp:Literal id="FailureText" runat="server" />

    </div>

    <div class="submit">

    <asp:ImageButton ID="LoginButton" ImageUrl="~/media/login-button.gif" CommandName="Login" ValidationGroup="LoginGroup" CssClass="login-button"

    AlternateText="Login" runat="server" />

    </div>

    </asp:Panel>

    </LayoutTemplate>

    </asp:Login>

     

    im just using a standard login template

    I've double checked the user auth is successful using Membership.ValidateUser("email","password") and that returns true..

     

    but for some reason cannot get it to play ball..

     

    Cheers,

    Tom

  • Jan Skovgaard 11280 posts 23678 karma points MVP 12x admin c-trib
    Feb 09, 2011 @ 06:08
    Jan Skovgaard
    0

    Hi Tom

    are you missing the <asp:Login> start "element" in the code as well or just in this posted snippet?

    /Jan

  • Tom Maton 387 posts 660 karma points
    Feb 09, 2011 @ 16:00
    Tom Maton
    0

    Hi Tom,

    What version of Umbraco you running on?

    Regards

    Tom

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies