473,396 Members | 1,989 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.

null Session object in HttpHandler

When my HttpHandler is processing a request when installed on a particular
2003 Server machine, the Context.Session object is null. Any idea why this
might be? My handler implements IRequiresSessionState and works normally on
other machines.

Thanks,

Jeremy
Nov 18 '05 #1
4 5013
Jeremy,
in my case every server seems to be 'particular'. I mean, I never suceeded
to access session variables in HttpHandler.

E.g., I have Asp.Net application where I use Session as storage for some of
my objects. In my application I have certain folders (with html files)
configured to be handled with HttpHandler. There I never see the same
session as in the rest of the application. In fact session ID inside matches
(!), but IsNewSession is always equal to 'true', and Session is empty (there
are no values that I expect to find).

I was thinking maybe that the reason could be the configuration. Every
HttpHanlder is configured as application (in IIS console), so I was having a
doubt that this (separate) application has it's separate session. After I
tried to handle http request in my application root (thus having HttpHandler
and my main application as one) the same thing was occuring.
Any clue?

Igor
----- Original Message -----
From: "Jeremy Lew" <js***@hotmail.com>
Newsgroups: microsoft.public.dotnet.framework.aspnet
Sent: Saturday, September 25, 2004 5:30 PM
Subject: null Session object in HttpHandler

When my HttpHandler is processing a request when installed on a particular
2003 Server machine, the Context.Session object is null. Any idea why this
might be? My handler implements IRequiresSessionState and works normally
on
other machines.

Thanks,

Jeremy

Nov 18 '05 #2
I think your problem is different than mine. I have no Session object
period (Context.Session is null). Your problem sounds more like the browser
is not accepting cookies and therefore the session is not maintained in
between requests.

"Igor Kramaric" <ig***********@zg.htnet.hr> wrote in message
news:%2****************@TK2MSFTNGP14.phx.gbl...
Jeremy,
in my case every server seems to be 'particular'. I mean, I never suceeded
to access session variables in HttpHandler.

E.g., I have Asp.Net application where I use Session as storage for some of my objects. In my application I have certain folders (with html files)
configured to be handled with HttpHandler. There I never see the same
session as in the rest of the application. In fact session ID inside matches (!), but IsNewSession is always equal to 'true', and Session is empty (there are no values that I expect to find).

I was thinking maybe that the reason could be the configuration. Every
HttpHanlder is configured as application (in IIS console), so I was having a doubt that this (separate) application has it's separate session. After I
tried to handle http request in my application root (thus having HttpHandler and my main application as one) the same thing was occuring.
Any clue?

Igor
----- Original Message -----
From: "Jeremy Lew" <js***@hotmail.com>
Newsgroups: microsoft.public.dotnet.framework.aspnet
Sent: Saturday, September 25, 2004 5:30 PM
Subject: null Session object in HttpHandler

When my HttpHandler is processing a request when installed on a particular 2003 Server machine, the Context.Session object is null. Any idea why this might be? My handler implements IRequiresSessionState and works normally
on
other machines.

Thanks,

Jeremy


Nov 18 '05 #3
For future generations of googlers, the answer is:

For a reason I haven't bothered to determine, the Session-state handling
HttpModule had been overridden in either a higher-level web.config or the
machine.config file. I had to add the following to my web.config to
re-assert that the usual set of handlers were in fact still added:

<httpModules>
<clear/>
<add name="OutputCache" type="System.Web.Caching.OutputCacheModule"/>
<add name="Session" type="System.Web.SessionState.SessionStateModule"/>
<add name="WindowsAuthentication"
type="System.Web.Security.WindowsAuthenticationMod ule"/>
<add name="FileAuthorization"
type="System.Web.Security.FileAuthorizationModule"/>
</httpModules>

"Jeremy Lew" <js***@hotmail.com> wrote in message
news:OM**************@TK2MSFTNGP09.phx.gbl...
When my HttpHandler is processing a request when installed on a particular
2003 Server machine, the Context.Session object is null. Any idea why this
might be? My handler implements IRequiresSessionState and works normally on other machines.

Thanks,

Jeremy

Nov 18 '05 #4
Thanx Jeremy,
my IE is accepting cookies, in the rest of the application everything works
well regarding session.

I have seen your post from 28OCT2004, nice that you solve it, maybe I should
also search some solution in that direction.

Bye,
Igor

"Jeremy Lew" <js***@hotmail.com> wrote in message
news:O%****************@TK2MSFTNGP10.phx.gbl...
I think your problem is different than mine. I have no Session object
period (Context.Session is null). Your problem sounds more like the
browser
is not accepting cookies and therefore the session is not maintained in
between requests.

"Igor Kramaric" <ig***********@zg.htnet.hr> wrote in message
news:%2****************@TK2MSFTNGP14.phx.gbl...
Jeremy,
in my case every server seems to be 'particular'. I mean, I never
suceeded
to access session variables in HttpHandler.

E.g., I have Asp.Net application where I use Session as storage for some

of
my objects. In my application I have certain folders (with html files)
configured to be handled with HttpHandler. There I never see the same
session as in the rest of the application. In fact session ID inside

matches
(!), but IsNewSession is always equal to 'true', and Session is empty

(there
are no values that I expect to find).

I was thinking maybe that the reason could be the configuration. Every
HttpHanlder is configured as application (in IIS console), so I was
having

a
doubt that this (separate) application has it's separate session. After I
tried to handle http request in my application root (thus having

HttpHandler
and my main application as one) the same thing was occuring.
Any clue?

Igor
----- Original Message -----
From: "Jeremy Lew" <js***@hotmail.com>
Newsgroups: microsoft.public.dotnet.framework.aspnet
Sent: Saturday, September 25, 2004 5:30 PM
Subject: null Session object in HttpHandler

> When my HttpHandler is processing a request when installed on a particular > 2003 Server machine, the Context.Session object is null. Any idea why this > might be? My handler implements IRequiresSessionState and works
> normally
> on
> other machines.
>
> Thanks,
>
> Jeremy
>
>



Nov 18 '05 #5

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

Similar topics

2
by: oliver.wulff | last post by:
Hi I wrote a IHttpModule which should store an object in the session. Unfortunately, the session is empty: public void OnAuthenticateRequest(object o, EventArgs ea) { HttpApplication httpApp =...
5
by: Filip | last post by:
Hello, (ASP.NET c#) I want to put some common functions into one class and within this class I need to have access to the Session, Request and Response. This class is not page behind file! I...
4
by: Igor K | last post by:
Hi all, I'm developing asp.net website. Most of the pages are aspx, but let's say, some 10% are html. For this html pages i use httphandlers to intercept calls and to perform some job on this...
2
by: Igor K | last post by:
Hi, I'm intercepting http requests coming to my asp.net application in order to do some additional processing of html pages. I'm having problems to access my variables stored in Session Object,...
3
by: Miguel | last post by:
Hi, I m new with aspnet. I am trying to do an application that writes the session in a cookie but the context.session is null. Here in the code, the cookieValue is allways without session, ......
7
by: Ty | last post by:
Hi, All- I have a custom httphandler that outputs an image to the browser based upon some user input. I'd like to be able to store information about that image in session and have them...
8
by: eric | last post by:
I have a 2.0 asp.net project. In a class contained within a seperate project, I am trying to reference HttpContext.Current.Session but Session is always null. I've tried implementing...
5
by: zlf | last post by:
Hello, I try to use a custom HttpHandler to add something to session, then display the original page. public void ProcessRequest(HttpContext context) { context.Session = "test"; } But, a...
2
by: Fernando Rodriguez | last post by:
I created an HttpHandler for rewritting URLs. It simply checks if the requested page is on a list of "special" pages (that do not exist) and if it is on the list then it will transfer to an ASPX...
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...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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.