Session is null in ashx handler

Discussion in 'ASP .Net' started by Jan Kucera, Aug 24, 2006.

  1. Jan Kucera

    Jan Kucera Guest

    Hi,
    why is session object null if the ashx file is requested? How can I force
    to create session when the request is to custom handler?

    Thanks,
    Jan
     
    Jan Kucera, Aug 24, 2006
    #1
    1. Advertising

  2. At what point are you trying to get the session?
    For instance, it wouldn't be available inside of a constructor or a finalizer

    "Jan Kucera" wrote:

    > Hi,
    > why is session object null if the ashx file is requested? How can I force
    > to create session when the request is to custom handler?
    >
    > Thanks,
    > Jan
    >
     
    =?Utf-8?B?RGF2aWQgSmVzc2Vl?=, Aug 24, 2006
    #2
    1. Advertising

  3. Jan Kucera

    bill Guest

    Did you inherit from System.Web.SessionState.IRequiresSessionState ?


    "David Jessee" <> wrote in message
    news:...
    > At what point are you trying to get the session?
    > For instance, it wouldn't be available inside of a constructor or a
    > finalizer
    >
    > "Jan Kucera" wrote:
    >
    >> Hi,
    >> why is session object null if the ashx file is requested? How can I
    >> force
    >> to create session when the request is to custom handler?
    >>
    >> Thanks,
    >> Jan
    >>
     
    bill, Aug 25, 2006
    #3
  4. Jan Kucera

    Jan Kucera Guest

    Yes, that was the point as I found on the web later. Sorry for the FAQ, the
    answer was easier than I thought it would be.
    Jan


    "bill" <> wrote in message
    news:OyJGIs$...
    > Did you inherit from System.Web.SessionState.IRequiresSessionState ?>
    > "David Jessee" <> wrote in message
    > news:...
    >> At what point are you trying to get the session?
    >> For instance, it wouldn't be available inside of a constructor or a
    >> finalizer
    >>
    >> "Jan Kucera" wrote:
    >>
    >>> Hi,
    >>> why is session object null if the ashx file is requested? How can I
    >>> force
    >>> to create session when the request is to custom handler?
    >>>
    >>> Thanks,
    >>> Jan
    >>>

    >
    >
     
    Jan Kucera, Aug 25, 2006
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Bart Adriaanse

    ASHX handler using codebehind ?

    Bart Adriaanse, Dec 8, 2003, in forum: ASP .Net
    Replies:
    3
    Views:
    5,181
  2. =?Utf-8?B?Sko=?=

    Request to a handler(.ashx) from a Page(.aspx)

    =?Utf-8?B?Sko=?=, Jun 30, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    5,808
    =?Utf-8?B?Sko=?=
    Jun 30, 2004
  3. =?Utf-8?B?RXJpYyBEYW4=?=

    Session object is NULL in HTTP handler

    =?Utf-8?B?RXJpYyBEYW4=?=, Jan 4, 2005, in forum: ASP .Net
    Replies:
    2
    Views:
    2,407
    =?Utf-8?B?RXJpYyBEYW4=?=
    Jan 4, 2005
  4. Replies:
    5
    Views:
    27,526
    Mike Schilling
    Mar 29, 2006
  5. JJ
    Replies:
    3
    Views:
    827
    Steven Cheng[MSFT]
    Nov 21, 2007
Loading...

Share This Page