Session restart problem

M

Malin

Hi everybody

I have an asp.net application with vb.net codebehind. In the web.config
the following settings are set for session state handling:

<sessionState
mode="InProc"
stateConnectionString="tcpip=127.0.0.1:42424"
sqlConnectionString="data source=127.0.0.1;Trusted_Connection=yes"
cookieless="false"
timeout="20"
/>

It is a purchase management system, so when a user logs in, the
application fetches his/her current purchases from a database located
on a different server and shows them on the screen, together with all
sorts of options of what one can do with the purchases.

The problem I'm facing is that when a customer having a lot of
purchases (I haven't figured out what the limit is yet) tries to do
anything within the system after they are logged in, he/she gets kicked
out of the system with the error message that the session has timed
out.

When debugging one can se that Sub Session_Start(ByVal sender As
Object, ByVal e As EventArgs) in Global.asax.vb gets called when the
user presses any key, so the Session is set to a new one, containing
nothing. My application checks the session state on every page, and if
it is empty, the user is redirected to the login page with the error
message that the session has timed out.

Does anybody know what it is that makes the application call Sub
Session_Start(ByVal sender As Object, ByVal e As EventArgs) when a key
is pressed in these situations?
I've got a hinch that it has something to do with the time it takes to
render the first page after logon and some sort of time out happens,
but I can't find any information about it anywhere.

I'm grateful for any input I can get on this one, so please please help
me

Thanks in advance

Malin
 
M

Malin

I've done a bit more research about this. What happens when a user logs
in is that a number of rows is fetched from the database and stored in
a dataset. For every row in this dataset an html row ("<TR><TD>bla
bla</TD><TD>...</TR>") is created, and added to a StringBuilder. The
StringBuilder is then turned into a string and the result is displayed
on the aspx-page. Once the page is rendered the user cannot do anything
within it without the application starting a new session and kicking
him/her out. This only happens to the users having the most rows to
fetch from the database, but even with them it is not a huge amount of
data that is fetched. (At around 170 rows)

Is there any limits in how much data a StringBuilder can contain? Or is
there something else that might break or cause this unexpected
behaviour? Memory leaks etc.

I'd appreciate any help I can get, because I don't really know how to
go about this right now.

Thanks in advance

Malin
 

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,764
Messages
2,569,565
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top