Copied to clipboard

Flag this post as spam?

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


  • Mark Olbert 87 posts 117 karma points
    Oct 20, 2009 @ 23:57
    Mark Olbert
    0

    RedirectFromLoginPage

    This is in v4.0.2.1, running under ASPNET 3.5 (or whatever 2+ version that really is :)) on Server 2008/IIS7.

    I have a custom template that handles login for my site. Everything works fine, up until I call FormsAuthentication.RedirectFromLoginPage.

    At that point I get redirected to /default.aspx...even though the referring URL was /member-area.aspx. In fact, I end up on /default.aspx even if I try to get to a page (e.g., /volunteer-area.aspx) that my user ID does not have access to based on Member Group security.

    Do I need to handle the redirect manually under Umbraco (i.e., authenticate the user, and then redirect to the referring page)?

    - Mark

  • Scott Hugh Alexandar Petersen 349 posts 164 karma points
    Dec 01, 2009 @ 10:43
    Scott Hugh Alexandar Petersen
    0

    Hey Mark

    Nothing at all about this actually, been searching high and low and found that this works for me:

    In  the login button click function I end it by doing this if the login is successful.

        try
        {
         Response.Redirect(Request.UrlReferrer.AbsolutePath.ToString()); 
        }
        catch (Exception ex)
        {
         // Here you could redirect to default.aspx or the login page.
        }

    You could of course make a routine doing this :)

    Scott

  • 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