Losing Session on Postback

G

Guest

I have an application in which I store state in the Session object. There
are two paths of execution in the Page_Load method of the default page. In
one path the Session state is preserved across postback and it works fine.
In the other path the Session state is lost and I get a new Session object
after the postback. The page has a grid on it and I am using a List<T> as a
datasource for the grid that is stored in the Session state and is to be
recovered on postbacks. The handler on the postback is to recover objects in
the data source that correspond to selections in the grid. When the Session
is lost I, obviouslly have problems in the handler.

What can cause loss of Session? I am not calling Abandon.

Thanks,
Eagle
 
R

Roland Dick

Hi Eagle,

> In the other path the Session state is lost and I get a new Session object
> after the postback. The page has a grid on it and I am using a
List<T> as a

are you modifying the content of your website's root directory? I had
that once with an xml file that I modified there, which caused the
application to restart. I think the solution was to move the xml file
into a subdirectory. That is apparently a new behaviour in ASP.NET 2.0.

Otherwise or if this doesn't help, check the event log, maybe there is
something helpful in it.

Roland
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,982
Messages
2,570,185
Members
46,736
Latest member
AdolphBig6

Latest Threads

Top