Solved

How to avoid this error: Session state has created a session id, but cannot save...

Posted on 2008-10-01
4
10,267 Views
Last Modified: 2013-11-07
In our VB/ASP web application, we have a sub-app (separate application in Website) that runs as a .net 1.1 web application with many aspx pages.  We also have another sub-app that runs as a .net 2.0 web application, but it uses a separate application pool.  This normally works fine, but on an upgrade to the web application I'm getting this error when I try to start up the 'eService' (.net 1.1 application):
"Session state has created a session id, but cannot save it because the response was already flushed by the application".  Here is the remainder of the detail:

[HttpException (0x80004005): Session state has created a session id, but cannot save it because the response was already flushed by the application.]
   System.Web.SessionState.SessionIDManager.SaveSessionID(HttpContext context, String id, Boolean& redirected, Boolean& cookieAdded) +621
   System.Web.SessionState.SessionStateModule.CreateSessionId() +52
   System.Web.SessionState.SessionStateModule.DelayedGetSessionId() +65
   System.Web.SessionState.SessionStateModule.OnReleaseState(Object source, EventArgs eventArgs) +592
   System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +138
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +65

I don't know what happened.  Anybody recognize this symptom and can provide a solution?
0
Comment
Question by:molmon
4 Comments
 
LVL 10

Expert Comment

by:orbulat
Comment Utility
maybe u can have a look, see if it can solve the problem
http://www.experts-exchange.com/Programming/Languages/.NET/ASP.NET/Q_23281996.html
0
 
LVL 16

Accepted Solution

by:
Gyanendra Singh earned 500 total points
Comment Utility
If you get an Exception saying "Session state has created a session ID, but cannot save it because the response was already flushed by the application" then make sure you have set DisplayWhenNewSession to 'false'

http://www.codeproject.com/useritems/WebRequestPanel.asp

you lose session state when the application pool is recycled (unless you r using sql server to store your sessions, of course) if that is your problem, and it occurs frequently, then someone missconfigured your webserver as app. pool recycling can be regulated in IIS. i personally think that the error message received sounds like its the app_pool... just a guess, but i'd take a look at the iis settings... try putting the app in a seperate pool for testing, or regulate the recyle settings.

reference

http://www.eggheadcafe.com/community/aspnet/6/10008376/re.aspx
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

User art_snob (http://www.experts-exchange.com/M_6114203.html) encountered strange behavior of Android Web browser on his Mobile Web site. It took a while to find the true cause. It happens so, that the Android Web browser (at least up to OS ver. 2.…
Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

7 Experts available now in Live!

Get 1:1 Help Now