473,399 Members | 4,192 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,399 software developers and data experts.

Page_load not fired after some time of inactivity

Hi

I am encountering following ASP.NET problem:
In the Page_Load event I initialize connection string of a sqlconnection. This works fine most of the time, but when the usercontinues using the page after long time of inactivity (he/shekept the IE window open for e.g. 20 minutes and then pressessome button), the Page_Load event is not fired and as result theconnection is not initialized with proper string.
This happens also for other variables that are initialized in thePage_Load event.
I have tried also adding the no-cache code
{
Response.Expires = 0;
Response.Cache.SetNoStore();
Response.AppendHeader("Pragma", "no-cache");
}
but does not help.
Any suggestions?

Thanks in advance
Michal Kostic

-----------------------
Posted by a user from .NET 247 (http://www.dotnet247.com/)

<Id>ymox8U5Wx0e61DNeVEazbg==</Id>
Nov 19 '05 #1
1 1377
Michal Kostic via .NET 247 wrote:
Hi

I am encountering following ASP.NET problem:
In the Page_Load event I initialize connection string of a sql
connection. This works fine most of the time, but when the user
continues using the page after long time of inactivity (he/she kept
the IE window open for e.g. 20 minutes and then presses some button),
the Page_Load event is not fired and as result the connection is not
initialized with proper string.
This happens also for other variables that are initialized in the
Page_Load event.
I have tried also adding the no-cache code
{
Response.Expires = 0;
Response.Cache.SetNoStore();
Response.AppendHeader("Pragma", "no-cache");
}
but does not help.
Any suggestions?

Thanks in advance
Michal Kostic


20 minutes is the default Session-expiry time. Are you sure it's the Page_Load
and not the Session where values disappear? How do you get that connection
string? Do you build it yourself (in Page_Load) or retrieve it from Session?

Hans Kesting
Nov 19 '05 #2

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

Similar topics

0
by: Funbeat | last post by:
Hi everybody, I'm facing with the following problem (bug ?) : A page is calling another one (export.aspx) for exporting data to excel. The tecnhique used is to create a Excel-MIME stream...
4
by: Alfons Puig | last post by:
Some pages (not all the pages, but I can't observe differences) opened from javascript via window.showModalDialog() doesn't fire the codebehind Page_Load event the second (and further) time it is...
7
by: Nimrod Cohen | last post by:
Hi During the page_load of my Aspx page "http://myMachine/MyWebApp/Quote.aspx" , i write to the response an html that embeds a form with the action pointing out to the same aspx page i.e...
14
by: V. Jenks | last post by:
I'm a little rusty having not touched .NET for 6 months and I can't remember why Page_Load is happening twice in this code: private void Page_Load(object sender, System.EventArgs e) {...
4
by: Seraph | last post by:
Again, I'm rather new here, so if I fail to follow any etiquette, please forgive me and let me know what I've done wrong, but I think this might interest quite a few people. One of my colleaques...
0
by: Joergen Bech | last post by:
Scenario: One editnews.aspx page used for editing various types of news, e.g. editnews.aspx?NewsType=Business editnews.aspx?NewsType=Fans Trouble is: There is a combobox on this page, which...
12
by: Nathan Sokalski | last post by:
What is the difference between the Page_Init and Page_Load events? When I was debugging my code, they both seemed to get triggered on every postback. I am assuming that there is some difference,...
1
by: rockdale | last post by:
Hi, I have a masterpage and on the page_load event I Populate my mainmenu from database. I the page_load event of my content, I am trying to programmly select the menuitem that represent...
2
by: Michal Valent | last post by:
I would like to fire some custom server control event before Page_Load event like this (from the trace of an aspx page) : Trace Information Category Message From First(s) From Last(s) aspx.page...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.