473,395 Members | 1,537 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,395 software developers and data experts.

context.Session is null

Hi;

I have a page that is created from a class using:
<httpHandlers>
<add verb="*" path="report-create.aspx" type="ReportCreate"/>
</httpHandlers>

and the code is:
public class ReportCreate : IHttpHandler
{
public void ProcessRequest(HttpContext context)
{
....

The problem is that context.Session is null as is
HttpContext.Current.Session - how do I get the session object?

--
thanks - dave
david_at_windward_dot_net
http://www.windwardreports.com

Jul 16 '06 #1
2 3402
Implement IRequiresSessionState interface.

http://msdn2.microsoft.com/en-us/lib...sionstate.aspx

Peter
--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com


"David Thielen" wrote:
Hi;

I have a page that is created from a class using:
<httpHandlers>
<add verb="*" path="report-create.aspx" type="ReportCreate"/>
</httpHandlers>

and the code is:
public class ReportCreate : IHttpHandler
{
public void ProcessRequest(HttpContext context)
{
...

The problem is that context.Session is null as is
HttpContext.Current.Session - how do I get the session object?

--
thanks - dave
david_at_windward_dot_net
http://www.windwardreports.com
Jul 16 '06 #2
THANK YOU!

--
thanks - dave
david_at_windward_dot_net
http://www.windwardreports.com

"Peter Bromberg [C# MVP]" wrote:
Implement IRequiresSessionState interface.

http://msdn2.microsoft.com/en-us/lib...sionstate.aspx

Peter
--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com


"David Thielen" wrote:
Hi;

I have a page that is created from a class using:
<httpHandlers>
<add verb="*" path="report-create.aspx" type="ReportCreate"/>
</httpHandlers>

and the code is:
public class ReportCreate : IHttpHandler
{
public void ProcessRequest(HttpContext context)
{
...

The problem is that context.Session is null as is
HttpContext.Current.Session - how do I get the session object?

--
thanks - dave
david_at_windward_dot_net
http://www.windwardreports.com
Jul 16 '06 #3

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 =...
2
by: Andreas Klemt | last post by:
Hello, which is the best way to transfer my DataTable to a PopUp Window? Using Context would be great but I it seems not to work. Which is the best solution? Thanks in advance, Andreas
7
by: Mike | last post by:
Hi, I have an ASP.NET solution in which I need to store some information, such as DB user and password. So far, I have used the Context object to share information between the various pages, but I...
7
by: mortb | last post by:
I have written a custom http handler and added it to the web.config file <httpHandlers> <add verb="GET" path="ITImageService.axd" type="ITImageService.ITImageGetter,ITImageService" />...
0
by: briand | last post by:
I have the following code in my base page to redirect to a session timeout page. override protected void OnInit(EventArgs e) { base.OnInit(e); //It appears from testing that the Request...
5
by: news.microsoft.com | last post by:
We are logging many events on our application but cant seem to discover how to determine who the user was in the session end event, as any session storage seems to have disapeared at the point at...
0
by: mark4asp | last post by:
Is this class to fix my Session Timeout problem OK? The problem is that users are timing out and the timeout then generates an error entry in the event log. I'd rather not have these entries. ...
14
by: R.A.M. | last post by:
Hello, I have created ASP.NET project in which I have a file Admin.cs. It contains static class Admin with some methods and properties. The problem is that in property get a reference...
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
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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
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...

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.