473,505 Members | 14,252 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Unlocking db objects in Session end

Dear Folks,
in my web page i am locking some table, in DB. and i take care to
unlock it when a log out button is clicked before the session is abandoned.
however
if the page user, closes the browser window instead of clicking hte log out
button it does not work. will the code work if put in session end. but it
seems that it does not work. please suggest me some other way to achieve the
same.
Thanx in advance.
regards,
--
S.Sundararajan
Nov 19 '05 #1
2 1143
Sundararajan,

It does work if you put the code in Session_End. However, if you do not
explicity set the Session.Timeout, the default is 20 minutes. So, your code
in the Session_End won't excute until there is 20 minutes of inactivity on
that session.

HTH
T

"Sundararajan" wrote:
Dear Folks,
in my web page i am locking some table, in DB. and i take care to
unlock it when a log out button is clicked before the session is abandoned.
however
if the page user, closes the browser window instead of clicking hte log out
button it does not work. will the code work if put in session end. but it
seems that it does not work. please suggest me some other way to achieve the
same.
Thanx in advance.
regards,
--
S.Sundararajan

Nov 19 '05 #2
as a follow up I would say it's a really bad idea to leave a database table
locked between requests. you have no idea what the user is going to do or
how long it will take him to respond.

obviously I can't comment on your specific application, but I would
generally try to avoid this scenario

Andy

"tperri" <tp****@discussions.microsoft.com> wrote in message
news:43**********************************@microsof t.com...
Sundararajan,

It does work if you put the code in Session_End. However, if you do not
explicity set the Session.Timeout, the default is 20 minutes. So, your
code
in the Session_End won't excute until there is 20 minutes of inactivity on
that session.

HTH
T

"Sundararajan" wrote:
Dear Folks,
in my web page i am locking some table, in DB. and i take care to
unlock it when a log out button is clicked before the session is
abandoned.
however
if the page user, closes the browser window instead of clicking hte log
out
button it does not work. will the code work if put in session end. but it
seems that it does not work. please suggest me some other way to achieve
the
same.
Thanx in advance.
regards,
--
S.Sundararajan

Nov 19 '05 #3

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

Similar topics

8
3160
by: Dave Wurtz | last post by:
All, I'm new to ASP development and I have a basic design question: Is it ok to store business objects to session variables or is there a better way to keep object information? For example,...
8
1654
by: Keith-Earl | last post by:
Okay, looking for a Best Practice. We are building a classic three tier app in VB.NET. When we load up a WebForm we have access to very useful objects such as the Session object. We frequently...
2
1983
by: Chris | last post by:
Hi, I am building a single webform/webpage asp.net application using VB.NET. I have created lots of classes for this web application. On page load I use a facade controller pattern class to...
47
3078
by: Max | last post by:
Due to the behaviour of a particular COM object, I need to ensure that a request for a particular ASP page is finalized before another request for the page is processed. Does IIS have a way to...
2
1428
by: HankD | last post by:
Hi, I am having a problem with instantiating two custom objects so they DO NOT point to the same memory location. What is happening is that changes I am making to my object1 are changing object2. I...
4
1267
by: mark_drewersback | last post by:
I've been developing in .net for approx 6 months now and would like an opinion on whether it is ok to use session to store objects? I normally create a property such as below in code behind on...
3
5524
by: NaeiKinDus | last post by:
Hello, i'm trying to program a thread that would be locked (by a mutex) and that would only be unlocked once that a function (generating data) is done. The purpose is to generate data, and unlock...
3
1962
by: Maximiliano | last post by:
Hello, I have an asp.net project that calculates a general tax. Ok, this tax is a big object formed with another child objects (as a mather of fact 15 another child object within it), like Ship,...
13
2392
by: DigitalDave | last post by:
A project I did awhile back stored php5 objects in elements of the $_SESSION array between pages that were navigated on the site. There were object classes representing teachers, and object classes...
0
7216
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7098
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
7471
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5613
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
4699
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3187
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3176
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
754
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
407
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.