473,386 Members | 1,712 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 has created a session id, but cannot save it because the response was already flushed by the application

Hi,

I've just upgraded my app from ASP.NET 1.1 to 2.0 and am sporadically
seeing this error:

Session state has created a session id, but cannot save it because the
response was already flushed by the application
I use Response.Flush() in my appplication and also have a session
variable in my Session_Start event, but I've never seen this error
before in 1.1. Can someone tell me if the Response.Flush behavior has
changed in 2.0, and if yes, how I can work around this error in 2.0?

Thanks in advance.

Cheers,
Ganesh.

Jul 6 '06 #1
2 6609
I would not recommend attempting to create Session items in the Session_Start
handler. In ASP.NET 2.0, a session does not become alive until you add an
item to it, and attempting to do so in Session_Start is a "catch-22"
situation.
Peter

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


"ga*****@gmail.com" wrote:
Hi,

I've just upgraded my app from ASP.NET 1.1 to 2.0 and am sporadically
seeing this error:

Session state has created a session id, but cannot save it because the
response was already flushed by the application
I use Response.Flush() in my appplication and also have a session
variable in my Session_Start event, but I've never seen this error
before in 1.1. Can someone tell me if the Response.Flush behavior has
changed in 2.0, and if yes, how I can work around this error in 2.0?

Thanks in advance.

Cheers,
Ganesh.

Jul 6 '06 #2
session state id is stored in a cookie. the cookie is a header, and must be
written before any content. if you do a flush, no headers can be written. in
1.1 if buffering was on (the default), flushes were not honored.

-- bruce (sqlwork.com)

<ga*****@gmail.comwrote in message
news:11*********************@m73g2000cwd.googlegro ups.com...
Hi,

I've just upgraded my app from ASP.NET 1.1 to 2.0 and am sporadically
seeing this error:

Session state has created a session id, but cannot save it because the
response was already flushed by the application
I use Response.Flush() in my appplication and also have a session
variable in my Session_Start event, but I've never seen this error
before in 1.1. Can someone tell me if the Response.Flush behavior has
changed in 2.0, and if yes, how I can work around this error in 2.0?

Thanks in advance.

Cheers,
Ganesh.

Jul 7 '06 #3

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

Similar topics

7
by: Seth | last post by:
I have noticed that the id of my session object changes when I switch from a non-secure to a secure connection. What I'm trying to do: I have a cookie that is built on the non-secure side of...
3
by: grooby | last post by:
I would like to develop an asp.net Web application using muliple web projects under one solution file and share the session information between web applications( or projects). Is this possible?
3
by: Mark | last post by:
Ok, I know that .net inherently does not share session data across asp.net projects, but is there any decent work around to this. We already have a big chunk of our application using the asp.net...
5
by: ASP.Confused | last post by:
As you can tell from my previous posts on this issue...I'm really confused :-/ I have a few ASP.NET web applications on my web host's "https" server. Our web host has a single "bin" folder for...
9
by: charliewest | last post by:
Hello - I have images saved in my SQL SERVER 2000 database. Using ASP.NET (C#) is there any way to temporarily save an image to a session object, and after running some other operations, later...
9
by: McGeeky | last post by:
Is there a way to get a user control to remember its state across pages? I have a standard page layout I use with a header and footer as user controls. Each page uses the same layout by means of...
2
by: PL | last post by:
I've seen a few of these in the eventlog, what in the world would cause something like this, why can't it save the session id cookie ?? Exception type: HttpException Exception message: Session...
5
by: Sean | last post by:
Problem with sessions I have created an application without concern for sessions. As it turns out I think that might be my undoing. What I have: I have an online quiz. I don’t need to know...
1
by: suvarna1026 | last post by:
Can any one plz tell me why I am getting this error,and what is the meaning of this error--- Session state has created a session id, but cannot save it because the response was already flushed by...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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...
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...
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,...

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.