473,626 Members | 3,965 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 IRequiresSessio nState and works normally on
other machines.

Thanks,

Jeremy
Nov 18 '05 #1
4 5032
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.publi c.dotnet.framew ork.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 IRequiresSessio nState 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.Sessio n 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******** ********@TK2MSF TNGP14.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.publi c.dotnet.framew ork.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 IRequiresSessio nState 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="OutputCac he" type="System.We b.Caching.Outpu tCacheModule"/>
<add name="Session" type="System.We b.SessionState. SessionStateMod ule"/>
<add name="WindowsAu thentication"
type="System.We b.Security.Wind owsAuthenticati onModule"/>
<add name="FileAutho rization"
type="System.We b.Security.File AuthorizationMo dule"/>
</httpModules>

"Jeremy Lew" <js***@hotmail. com> wrote in message
news:OM******** ******@TK2MSFTN GP09.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 IRequiresSessio nState 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%******** ********@TK2MSF TNGP10.phx.gbl. ..
I think your problem is different than mine. I have no Session object
period (Context.Sessio n 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******** ********@TK2MSF TNGP14.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.publi c.dotnet.framew ork.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 IRequiresSessio nState 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
11276
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 = (HttpApplication) o; HttpSessionState session = httpApp.Context.Session; If I set the WebMethod attribute 'EnableSession' of my webservice (HttpModule is active either) I can access the session in the web service
5
2636
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 keep trying all sorts of namespaces, but to no avail. Keep getting: "The name 'Session' does not exist in the class or namespace 'xyz xyz xyz'" and "The type or namespace name 'Page' could not be found (are you missing a using directive or an...
4
4234
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 pages. Lately I need to access Session state in HttpHandler's code. This seems to be the problem. I searched the internet for some solution, i always found advice to dervie from IHttpHandler and that will do, but obivously not.
2
2539
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, that always has IsSessionNew = TRUE. I can not figure out why is that. I expect to have Session access in "Public Sub ProcessRequest(ByVal context As HttpContext)" event. Is this correct? Or maybe to early/late? Of course I'm using...
3
9580
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, ... I dont know how to get the session, maybe I cant... thanks in advance Miguel
7
2677
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 accessible to all aspx pages in my project. Session state seems to be working normally in my handler, however, the session variables are not accessible anywhere outside the handler itself. Any ideas?
8
996
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 IRequiresSessionState but it does not seem to matter. For a test I created a small solution consisting of a web project and a seperate project to hold a test class. In the test class I reference HttpContext.Current.Session and it works fine with or without...
5
4310
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 empty page is rendered with this HttpHandler, should I add some
2
3036
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 page that will generate the content dynamically. The problem is that after the call to Server.Transfer or Server.Execute the page i'm transfering to throws an exception when it tries to access the Session object. The error says that I must set...
0
8266
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8199
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8638
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8365
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7196
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
4092
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2626
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1811
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1511
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.