Search Result

Collapse
2 results in 0.0014 seconds.
Keywords
Members
Tags
httpcontext.current
  •  

  • moorcroft
    started a topic Why is HttpContext.Current set to null?
    in .NET

    Why is HttpContext.Current set to null?

    Hi the following lump of code throws a null exception because the .Current value is set to null (line 6). Could someone please help me understand why? I've taken this from a previous working project..

    Code:
            private static ISessionFactory SessionFactory
            {
                get
                {
                    ISessionFactory sessionFactory = null;
                    sessionFactory = HttpContext.Current.Application["sessionFactory"]
    ...
    See more | Go to post

  • Doogie
    Guest started a topic HttpContext.Current.User.Identity.Name loses value

    HttpContext.Current.User.Identity.Name loses value

    Hi,
    I am using HttpContext.Cur rent.User.Ident ity.Name to get a user id
    from a web application. I then use that as part of a name of a cookie
    I'm writing. 30 minutes later I do a refresh of this page and try to
    access that cookie. However, because I am using
    HttpContext.Cur rent.User.Ident ity.Name to get the user id to know what
    that cookie name even is, I am having problems because apparently
    after 30 minutes...
    See more | Go to post
Working...