Solved

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

Posted on 2008-10-01
4
10,346 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

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

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

In my previous two articles we discussed Binary Serialization (http://www.experts-exchange.com/A_4362.html) and XML Serialization (http://www.experts-exchange.com/A_4425.html). In this article we will try to know more about SOAP (Simple Object Acces…
ASP.Net to Oracle Connectivity Recently I had to develop an ASP.NET application connecting to an Oracle database.As I am doing it first time ,I had to solve several problems. This article will help to such developers  to develop an ASP.NET client…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
Both in life and business – not all partnerships are created equal. As the demand for cloud services increases, so do the number of self-proclaimed cloud partners. Asking the right questions up front in the partnership, will enable both parties …

861 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

30 Experts available now in Live!

Get 1:1 Help Now