[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 10899
  • Last Modified:

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

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
molmon
Asked:
molmon
1 Solution
 
orbulatCommented:
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
 
Gyanendra SinghArchitectCommented:
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

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now