473,396 Members | 1,915 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Problems implementing IHttpHandler

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 tohave 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. . . .

Nov 18 '05 #1
1 3057
Public Class MakeData
Implements IHttpHandler
Implements IRequiresSessionState

similar as you implement IHttpHandler. IRequiresSessionState is just a
marker interface so there's not any related implementation.
--
Teemu Keiski
MCP, Microsoft MVP (ASP.NET), AspInsiders member
ASP.NET Forum Moderator, AspAlliance Columnist

"lapin" <an*******@discussions.microsoft.com> wrote in message
news:0e****************************@phx.gbl...
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. . . .

Nov 18 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: lapin | last post by:
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...
5
by: vimakefile | last post by:
I'd like to have the concept of a Page (different code-behind file for each url, session state, etc.) but be able to specify my own custom HTTP payload. (I don't want to use any Asp.Net forms,...
0
by: Stu | last post by:
Hi, I am trying to write a basic httphandler to 'fake' that pages actually exist. I have copied the code below from various sites - but the line 'Implements IHttpHandler' reports an error "type...
3
by: Roshawn Dawson | last post by:
Hi, I'm having a bit of a problem using ASP.NET. I'm using VS.NET 2002 and I have .NET Framework 1.0 and 1.1 installed on my development machine. I've developed many web apps with no problems,...
2
by: bryan | last post by:
I can't find much info on what makes an instance of the handler reusable. If it maintains no internal state, I would assume that it is safe to be reusable - correct? I have one that grabs a value...
24
by: John Rivers | last post by:
ASPX which means ASPX pages, the code-behind concept, User Controls, Web Controls etc. is very poorly designed and makes it extremely hard to develop professional quality web applications. ASPX...
16
by: pamelafluente | last post by:
I am still working with no success on that client/server problem. I need your help. I will submit simplified versions of my problem so we can see clearly what is going on. My model: A client...
1
by: Aartware | last post by:
I've read all the items about the IHttpHandler and the session-object and I see nothing wrong with my code, but still I have no session object. This is my code: Imports System Imports...
0
by: shapper | last post by:
Hello, I am using an ASP.NET 3.5 SP1 and a while ago I created an IHttpHandler that transforms a Sitemap XML file to a compatible Google Sitemap (https://www.google.com/webmasters/tools/docs/en/...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.