search envelope-o feed check
Home Unanswered Active Tags New Question
user comment-o

Session state has created a session id..,

Asked by Donahue
17 years ago.

Session state has created a session id, but cannot save it because the response was already flushed by the
application.

Bascially, the Session Object is getting deleted when I use this control. I have a main web site that uses the ASP.NET Membership Management module. The main website is logged into and all membership information is acquired and saved into a Session Object. When the page that contains the scheduling control is called, I no longer have this session object. It has been flushed. I need this session object to view and confirm what member is logged in.

This exception is occuring on the page the scheduling control is on. I have read that AJax flushes the session state. Has anyone had an issue with this error and if so, how did you get it resolved?

Comment posted by Dan Letecky
17 years ago.
DayPilot control doesn't touch Session object at all. It's only being used in the samples.

I'll do some tests with Session, DayPilot and AJAX and I'll post my results.
Comment posted by Dan Letecky
17 years ago.
It seems that this exception is caused by calling Response.Flush() before creating a new Session cookie.

As you mentioned, there are some issues with ASP.NET AJAX. ASP.NET AJAX library is calling Response.Flush() during partial (async) PostBack so it might cause this exception. DayPilot itself doesn't call Response.Flush() nor accesses Session object.

Few questions:
1) Does it happen when you load the page for the first time (i.e. no postback/callback)?
2) Do you use ASP.NET AJAX library?

You can also contact me directly at daypilot @ annpoint.com so we can discuss it faster.
Answer posted by Donahue
17 years ago.

Hi Dan,

This effect was my error in the ASP.NET Login Control. I am setting my session state object there and for some reason the code wasn't getting called. Sorry.. I Love your control!!!

Comment posted by Anonymous
15 years ago.

That happens because sometimes (depending on the web.config configuration) the SessionID is
not set in the cookie when Session_Srtart event executes in the global asax.

This question is more than 1 months old and has been closed. Please create a new question if you have anything to add.