473,587 Members | 2,607 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Close User Session

How can i configure my application for closing the session ? How can i use
the session end for closing the session ?
Mar 14 '07 #1
13 2084
Session end is only the event fired when a session is ended. To end the
user's session you would use Session.Abandon () I believe. It will
automatically close the session after 20 minutes of inactivity anyways, and
unload the application itself after the last session is closed.
--
Hope this helps,
Mark Fitzpatrick
Former Microsoft FrontPage MVP 199?-2006

"Laurahn" <le*****@newsgr oups.nospamwrot e in message
news:e1******** ******@TK2MSFTN GP03.phx.gbl...
How can i configure my application for closing the session ? How can i use
the session end for closing the session ?

Mar 14 '07 #2
On Mar 14, 11:17 pm, "Laurahn" <leme...@newsgr oups.nospamwrot e:
How can i configure my application for closing the session ? How can i use
the session end for closing the session ?
Configure a timeout or call Session.Abandon ()

Mar 14 '07 #3
Thanks Mark.

But, i want to know what code I have to put into my app for that hapends.

Can i use a button?

i've read about put some code on Global.asax
Mar 14 '07 #4
How i Configure a timeout?

Where have I to call Session.Abandon ()?
Mar 14 '07 #5
"Laurahn" <le*****@newsgr oups.nospamwrot e in message
news:uN******** ******@TK2MSFTN GP03.phx.gbl...
But, i want to know what code I have to put into my app for that hapends.

Can i use a button?

i've read about put some code on Global.asax
In Global.asax, you have an event called Session_End - this is the event
which fires (so long as your Session is InProc) when the Session ends.

Under normal circumstances, the Session ends for two reasons:

1) it has timed out automatically, by default after 20 minutes of
inactivity, though this figure can be changed

2) it has been ended explicitly ("torn down", to use the jargon)

You may be familiar with logging out of your on-line banking application by
clicking a "Logout" button or whatever - it is the code behind such a button
where you would place the Session.Abandon () code.
Mar 14 '07 #6
Make a button on your web page. Give it text of "Log out". In its
server-side click event handler, simply write: Session.Abandon ()

And/Or in your Web.Config file, find the section that is already there about
the session timeout and change the time from 20 minutes to something else.

"Laurahn" <le*****@newsgr oups.nospamwrot e in message
news:u$******** ********@TK2MSF TNGP06.phx.gbl. ..
How i Configure a timeout?

Where have I to call Session.Abandon ()?


Mar 15 '07 #7
You response doesn't really address the question. The Session_End event
handler is of no use when you are trying to end the session, only after (or
as) the session has ended.

I have been working with sessions for many, many years and you are the first
person to use the "torn down" jargon you speak of that I've ever heard.
It's not a good idea to introduce jargon that is not widely used.
"Mark Rae" <ma**@markNOSPA Mrae.comwrote in message
news:uh******** ******@TK2MSFTN GP03.phx.gbl...
"Laurahn" <le*****@newsgr oups.nospamwrot e in message
news:uN******** ******@TK2MSFTN GP03.phx.gbl...
>But, i want to know what code I have to put into my app for that hapends.

Can i use a button?

i've read about put some code on Global.asax

In Global.asax, you have an event called Session_End - this is the event
which fires (so long as your Session is InProc) when the Session ends.

Under normal circumstances, the Session ends for two reasons:

1) it has timed out automatically, by default after 20 minutes of
inactivity, though this figure can be changed

2) it has been ended explicitly ("torn down", to use the jargon)

You may be familiar with logging out of your on-line banking application
by clicking a "Logout" button or whatever - it is the code behind such a
button where you would place the Session.Abandon () code.

Mar 15 '07 #8
I don't believe the application is unloaded after the last session is
unloaded. I belive the application sits idle until it crashes or is taken
off-line, but I don't believe it just ends itself.
"Mark Fitzpatrick" <ma******@fitzm e.comwrote in message
news:uQ******** ******@TK2MSFTN GP05.phx.gbl...
Session end is only the event fired when a session is ended. To end the
user's session you would use Session.Abandon () I believe. It will
automatically close the session after 20 minutes of inactivity anyways,
and unload the application itself after the last session is closed.
--
Hope this helps,
Mark Fitzpatrick
Former Microsoft FrontPage MVP 199?-2006

"Laurahn" <le*****@newsgr oups.nospamwrot e in message
news:e1******** ******@TK2MSFTN GP03.phx.gbl...
>How can i configure my application for closing the session ? How can i
use the session end for closing the session ?


Mar 15 '07 #9
"Scott M." <s-***@nospam.nosp amwrote in message
news:Oz******** ******@TK2MSFTN GP06.phx.gbl...
Make a button on your web page. Give it text of "Log out". In its
server-side click event handler, simply write: Session.Abandon ()
Wish I'd thought of that... ;-)
Mar 15 '07 #10

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

Similar topics

9
3630
by: Pack Fan | last post by:
I've noticed that session variables will persist on Mac IE even after all browser windows have been closed. One must quit the program to clear the session variables. This presents a security risk for my session variable based security scheme. Basically, the risk is that a user will login to my site, close the window when done and allow...
1
14485
by: Xing Rong | last post by:
I have an asp page to authenticate users by checking their uid and password: --------------------------------------- If (request("UID") = "user" and request("Password") = "pwd") then session("UID") = "user" Session.Timeout= 300 End if ---------------------------------------
4
2316
by: Champika Nirosh | last post by:
Hi All, I have a asp .net app and it is a online test application so tracking the user behaviour is very important. The problem is in what way I can identify the user logoff time if it happens to loggoff due to a browser crash. Nirosh.
4
2943
by: Pierke | last post by:
Hey guys out there, I really need your help, i am building up a web site, so for security reasons i need to do "some things" before the user log off, and i indeed do it. Now the matter is that any user can also CLOSE the page without logging off, and by then i would need to be able to so "some things" (such as save his log off time) and i...
20
2028
by: Harry | last post by:
My development environment is Framework 1.1, ASP.Net and IE 6.X. I have logout button in all the screens in the application. I am doing database activity when the user clicks on logout button. However the user can close the application using the IE close cross mark. When the user closes the application without logout button all my database...
1
3558
by: RJN | last post by:
Hi Sorry for posting again. I open a few pop-up windows from a main window. If session time out occurs in either the main window or the pop-up windows ,I redirect the user to login screen. Currently what is happening is , suppose session times out in a pop-up window, then the login screen opens in the same window. I want to close all the...
4
4802
by: Bill Manring | last post by:
I need to capture the event when the user closes the browser in my application. I have some code in the session_End event, which works fine when the session times out, but I need to end the session immediately when the user closes the browser. Does anyone know a way of doing this? -- Thanks,
10
2889
by: newbie | last post by:
My application_end event in global.asax is not working as-is. In order to debug, I want to call it from another file, say debug.aspx through a button, e.g. "end application". How do I call application_end in global.asax from debug.aspx? thanks
20
3161
by: luqman | last post by:
If user login with the login control in ASP.Net 2005 and then just close the browser and then open the browser again, the login status shows, User still Login? Any idea, how to Logout the User when the User click on the Close Button of Browser ? I am using Sql Membership Provider for security. Best Regards,
0
7918
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7843
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
8340
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7967
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
6621
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
3840
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
1
2353
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1452
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1185
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.