473,323 Members | 1,589 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,323 software developers and data experts.

Session restart problem

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

Jan 19 '06 #1
1 1035
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

Jan 20 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Brian Schloz | last post by:
Hello, I just thought I'd share my particular situation regarding session state periodically being "lost" in my asp.net app. I read with interest all of the posts regarding lost session state...
14
by: Michael Carr | last post by:
I have an intermittent problem that occurs on a very small number of browsers that access my website. The strange thing is this: my site works perfectly for 99.9% of browsers. The behavior...
2
by: Paul | last post by:
Tried to post this hours ago, but it still isn't visible. If it's a repeat, sorry for the inconvenience. Hello, all --- Environment: Visual Studio.NET 2003 (C#); Windows 2003 Server; IIS 6.0...
5
by: ASP.Confused | last post by:
As you can tell from my previous posts on this issue...I'm really confused :-/ I have a few ASP.NET web applications on my web host's "https" server. Our web host has a single "bin" folder for...
5
by: fbwhite | last post by:
I know this issue has been brought up many times, but I have tried many of the solutions to no avail. I wanted to give my specific case to see if someone could be of any help. We are using the...
12
by: ACaunter | last post by:
Hi all, I was wondering how i could write some code which would automatically open the Login Page once the session has expired? -- AdamPC@hotmail.com
13
by: Alexander Widera | last post by:
hi, who has seen the follow problem or could help please? i visit a page .... i read a sesssion-var . ... everythink works...... i visit the page again..... error ... the sessionvar is null .... i...
1
by: Paul | last post by:
Hello, all --- Environment: Visual Studio.NET 2003 (C#); Windows 2003 Server; IIS 6.0 Here is the problem I am having. I have created a web custom control in C# which includes a datagrid,...
3
by: HLady | last post by:
I posted earlier about this, I have an application and a sequence of activities will cause the session to restart. My code will go to session_start right after I execute a Response.Redirect(mypage)...
3
by: SevDer | last post by:
Hi All, I am recently experiencing a weird problem. I don't know what exactly is the cause of the problem but here is my scenario and symptoms. First of all here is my architecture 1. I have...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.