I would not recommend attempting to create Session items in the Session_Start
handler. In ASP.NET 2.0, a session does not become alive until you add an
item to it, and attempting to do so in Session_Start is a "catch-22"
situation.
Peter
--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com
"" wrote:
> Hi,
>
> I've just upgraded my app from ASP.NET 1.1 to 2.0 and am sporadically
> seeing this error:
>
> Session state has created a session id, but cannot save it because the
> response was already flushed by the application
>
>
> I use Response.Flush() in my appplication and also have a session
> variable in my Session_Start event, but I've never seen this error
> before in 1.1. Can someone tell me if the Response.Flush behavior has
> changed in 2.0, and if yes, how I can work around this error in 2.0?
>
> Thanks in advance.
>
> Cheers,
> Ganesh.
>
>