• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 399
  • Last Modified:

Hot to close session in End event of my ASP.NET application ?

 Hi experts!

I’m new to ASP.NET and need a little help.
I have a session variable which I want to delete after my NET application close. I use InPro way and I read that I have events for end of application in which I think I can erase session.

1.      Where in VS2008 I get this event ? How to added it my application?
2.      What are command to complete remove session ? Session.Abandon or Session.Remove or ?
0
dvplayltd
Asked:
dvplayltd
1 Solution
 
princeatapiCommented:
I would suggest you to have the clean up work over the global.asax

http://articles.techrepublic.com.com/5100-10878_11-5771721.html

0
 
princeatapiCommented:
0
 
dvplayltdAuthor Commented:
ok ...LOOK like this is answe or my question.
But I need some clarify about Session_End .

If user simple close his brouser I will or will not get this event ?

And also you do not answer me on question 2
0
Cloud Class® Course: CompTIA Cloud+

The CompTIA Cloud+ Basic training course will teach you about cloud concepts and models, data storage, networking, and network infrastructure.

 
darshan_derasariCommented:
If you want to remove specific session variable then you can use Session.Remove() method and if you want to remove all the session variables then you need to use Session.Abandon() method.

However you still need to understand global.asax file. Please refer below link.

http://aspalliance.com/1114_Understanding_the_Globalasax_file.all

When Session_End() from global.asax executed it clears all the session variables automatically.

Hope this helps.
0
 
Alfred A.Commented:
0
 
dvplayltdAuthor Commented:
10x
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now