Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

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

Posted on 2008-10-01
4
10,451 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
ID: 22622311
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
ID: 22624314
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

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This document covers how to connect to SQL Server and browse its contents.  It is meant for those new to Visual Studio and/or working with Microsoft SQL Server.  It is not a guide to building SQL Server database connections in your code.  This is mo…
This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

860 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