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

Session state is not available in this context - webresource.axd ?

I have a web page (Asp.net 2.0, vs2005) in which there is this construction:

<img src="/pages/showimage.aspx">

In global.asax I access sessions in Application_PreRequestHandlerExecute
event.

When I try to access the page through browser this error is appear:

--------------------------------------------------------------------------------------------------------------------------------------------

Error in:
https://localhost/webresource.axd?d=...17878583701558

Error Message:Session state is not available in this context.

Error Source: System.Web

Error TargetSite:System.Web.SessionState.HttpSessionStat e get_Session()

Error InnerException:

If I remove "<img src="/pages/showimage.aspx">" the page works ok.

Any idea what can cause such behavior?


May 11 '06 #1
1 3013
you are trying to access the session data before its been loaded, as this is
done by the handler.

-- bruce (sqlwork.com)
"kingski" <sg*******@ssffghgg.com> wrote in message
news:OS*************@TK2MSFTNGP02.phx.gbl...
I have a web page (Asp.net 2.0, vs2005) in which there is this
construction:

<img src="/pages/showimage.aspx">

In global.asax I access sessions in Application_PreRequestHandlerExecute
event.

When I try to access the page through browser this error is appear:

--------------------------------------------------------------------------------------------------------------------------------------------

Error in:
https://localhost/webresource.axd?d=...17878583701558

Error Message:Session state is not available in this context.

Error Source: System.Web

Error TargetSite:System.Web.SessionState.HttpSessionStat e get_Session()

Error InnerException:

If I remove "<img src="/pages/showimage.aspx">" the page works ok.

Any idea what can cause such behavior?


May 11 '06 #2

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

Similar topics

1
by: Steve Remer | last post by:
My application (relevant code snippets below) originally used Session variables in order to maintain state from page to page. After being unable to solve the mystery of why those variables were...
0
by: matt | last post by:
I've come across a real problem and am totally stuck as to why this is happening, hoping desperately that someone else has experienced the same thing, and knows a solution! Session state should be...
2
by: John A Grandy | last post by:
for high traffic public websites , what are the proven options for session-state storage & management ? is an out-of-process state-server generally preferred over a sql-server ? what are the...
1
by: Axel Dahmen | last post by:
Hi, I've added a property to my Page base class (this base class inherits from Page and all my aspx.cs classes inherit from my base class). This property of mine uses the Session object to...
8
by: Leon | last post by:
I know that I can access session state on an asp.net page using Page objects, but how do I access store data in sessionstate from the middle tiers?
2
by: Stu | last post by:
Hi, I am trying to access session variable value from the 'Application_BeginRequest' handler in the global asax file but get the message - 'Session state not available in this context'. I have...
0
by: Jonathan Duke | last post by:
I have written a custom session state provider that stores session data in XML in a SQL database , and I was running the SQL profiler to verify that all of my stored procedures were called in the...
3
by: kingski | last post by:
I have a web site created with ASP.NET 1.1. availability Global.asax: protected void Application_PreRequestHandlerExecute(Object sender, EventArgs e)
4
by: BenCoo | last post by:
In my ASP.NET 2.0 application I have in the global.asax.file the following code Sub Application_Error(ByVal sender As Object, ByVal e As EventArgs) ' Code that runs when an unhandled error...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
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...
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:
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
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...

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.