Null Session values in IHttpHandler

Discussion in 'ASP .Net' started by lapin, Nov 18, 2003.

  1. lapin

    lapin Guest

    I'm trying to get access to session variables from an IHttpHandler
    class. In several places I've seen the solution posted as in this
    message:

    >If you define your own custom HttpHandler, you need to >import the
    >System.Web.SessionState namespace, you
    >need it to implement the IRequiresSessionState interface >if you want

    it to
    >have a session instance :p


    That's great, but I cannot figure out how to "implement the
    IRequiresSessionState interface. Seems I need a "Public Interface
    irequiressessionstate" statement somewhere, but I cannot get this to
    complile. What's missing?


    Current code:
    Imports System.Web
    Imports System.Xml
    Imports System.Xml.Xsl
    Imports System.Data
    Imports System.Data.SqlClient
    Imports System.Web.SessionState

    Public Class MakeData
    Implements IHttpHandler

    Public ReadOnly Property IsReusable() As Boolean _
    Implements IHttpHandler.IsReusable
    Get
    Return False
    End Get
    End Property

    Public Interface irequiressessionstate (?????)

    Public Sub ProcessRequest(ByVal context As HttpContext) Implements
    IHttpHandler.ProcessRequest

    Dim sDetailDeviceID As String = ""

    etc. . . .




    *** Sent via Developersdex http://www.developersdex.com ***
    Don't just participate in USENET...get rewarded for it!
    lapin, Nov 18, 2003
    #1
    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. lapin
    Replies:
    1
    Views:
    2,246
    Teemu Keiski
    Nov 19, 2003
  2. Jean CADEAU
    Replies:
    1
    Views:
    378
    Alvin Bruney
    Nov 30, 2003
  3. Chance Hopkins

    IHttpHandler, ProcessRequest and Session

    Chance Hopkins, Apr 14, 2005, in forum: ASP .Net
    Replies:
    4
    Views:
    4,959
    Chance Hopkins
    Apr 14, 2005
  4. Replies:
    5
    Views:
    26,508
    Mike Schilling
    Mar 29, 2006
  5. Aartware
    Replies:
    1
    Views:
    451
    Aartware
    Dec 20, 2006
Loading...

Share This Page