Copied to clipboard

Flag this post as spam?

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


  • Karl Walker 10 posts 30 karma points
    Oct 08, 2010 @ 15:04
    Karl Walker
    0

    .NET Membership / HttpContext.Current.User == null problem when no page declared such as just domain address

    I have a .NET membership control for Members to login.

    It works fine except when I go to my homepage without the /home.aspx declaration. For example...

    http://www.mydomain.com/

    I've debugged some other code here and I've found that the HttpContext.Current.User object is NULL

    http://www.mydomain.com/home.aspx works.

    The problem here is even when I've logged on and go back to my homepage, it does not show I'm logged in, in fact the control at the top of my page is asking for a username and password.  If I move around the site it works, go back to home login again.

    Has this got somethign to do with the umbracoBaseRequestModule?
    Does anyone know how to stop this happening, I'm guessing its some configuration problem.

    I could potentially create all links to home.aspx, but this is not good for SEO reasons, all homepage links be it in a menu or a company logo link, should return just to the domain and not domain/homepage.aspx.

    Ideas?

  • Ismail Mayat 4511 posts 10092 karma points MVP 2x admin c-trib
    Oct 08, 2010 @ 15:17
    Ismail Mayat
    0

    Karl,

    In the old umbracoExtensions there was login control that had some adding to member cache stuff see http://umbracoext.codeplex.com/SourceControl/changeset/view/53797#58471 not sure if its related?

    Regards

    Ismail

  • Karl Walker 10 posts 30 karma points
    Oct 08, 2010 @ 15:25
    Karl Walker
    0

    Thanks Ismail,

    I found this post (see the last entry in the thread about the MODULE attribute.

    Fixed it

    http://our.umbraco.org/forum/core/general/9177-HttpContextUser-is-null-in-base-httpmodule

     

  • Neil Norpa 24 posts 44 karma points
    Dec 19, 2011 @ 11:49
    Neil Norpa
    0

    Did you use the correct namespace?

     

     

Please Sign in or register to post replies

Write your reply to:

Draft