473,382 Members | 1,424 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,382 software developers and data experts.

how to abondon session in the form authentication(Global.asax.cs)

Hi,

The application is using Form authentication.

in the Application_PreRequestHandlerExecute, I check if the context.current.
user.Identity has content, and the principle haven't been added (This event
will be called every time the user request page), if not added, I will call

"Session.Add("myPrincipal", pp);" ( this only need to be added once)

In the Session_end event, I called Session.abondon().

the problem is here:

after the Session_end event, the application will call the
Application_PreRequestHandlerExecute again, this time since the session
object just been cleared, it qualify for ""Session.Add("myPrincipal", pp);" ,
the session will be add back again !! , it is wrong since I want to exit the
application, how can I resolve it?

Thanks very much.

Jasmin

I remove the session_Id
from the session list at the Session_End event. after the Session_end
event , the application will call the Application_preRequestHandlerExecute
event again, this time, the session will be added again since the session_ID
has just been removed, it's ready to add...

Jul 21 '05 #1
0 1066

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

Similar topics

3
by: nao921 | last post by:
Hi everyone, I am currently involved in a project that involves a windows client program written in delphi and a web application written in php. I have made several php pages for the delphi...
1
by: SMc | last post by:
Hi I am attempting to set global variable (bad practice, will replace with class later, just exploring an idea) with the following code in an startup module from globaldec.bas... Global...
4
by: jzink | last post by:
I need to update a sql table with the last date/time that a user logged into my web site. The site is protected via integrated authentication. I can put code in the global.asax file to update...
2
by: ad | last post by:
I want to get the Application path, I use the code: string sDir = Request.ApplicationPath ; It run well in code behind, but if I place the code above in Global.asax like: void...
8
by: Thomas Coleman | last post by:
Ok, I've obviously discovered that Global.aspx has been completely changed in ..NET 2.0. However, I haven't figured out how to declare a constant that's available to any page in my application...
0
by: Jasmine | last post by:
Hi, The application is using Form authentication. in the Application_PreRequestHandlerExecute, I check if the context.current. user.Identity has content, and the principle haven't been added...
17
by: Riaan | last post by:
Hi guys! I have an issue that needs urgent resolution. Imagine this scenario: You have: 1 production server running Windows Server 2003, IIS6 and an instance of MSDE 2000. There is an...
4
by: kuhrty | last post by:
I am using a window form and trying to get a dataset used in the form globally but I am having an issue setting the property and setting it locally to the class. When I try to call the dataset...
8
by: ecir.hana | last post by:
Dear list, maybe I'm overlooking something obvious or this is not possible at all or I don't know. Please, consider the following code: ## insert here anything you like def changer():
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...
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...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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...

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.