473,734 Members | 2,211 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Session not ending?


I've got the following configuration in Web.config

<authenticati on mode="Forms">
<forms name=".ASPXCOOK IE" loginUrl="sigin .aspx" protection="All "
timeout="30" path="/">
</forms>
</authentication>
<authorizatio n>
<deny users="?" />
</authorization>

When I first try to get a page from the application (let's say ot.aspx)
it redirects to the sigin.aspx page.

Once logged I execute Session.Abandon

Now, I can get the "ot.aspx" page again without having to sig in

It would only ask me again to sigin until I close the browser, wht?

Best Regards
Fabio Cavassini
http://www.pldsa.com

Jan 18 '06 #1
1 1145
On your logout routine, redirect the person to a page. The session.abandon is
not complete on the client side until you ask for another page, as it has to
send a new session cookie (server cookie) to your browser. Until that point
in time, you are still "authenticated" .

As a safety measure, you can add a handler that ensures only active
credentials can access anything and, possibly, expire pages so the user, at
best, gets those ugly "page no longer valid" pages.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

*************** ************
Think Outside the Box!
*************** ************
"Fabio Cavassini" wrote:

I've got the following configuration in Web.config

<authenticati on mode="Forms">
<forms name=".ASPXCOOK IE" loginUrl="sigin .aspx" protection="All "
timeout="30" path="/">
</forms>
</authentication>
<authorizatio n>
<deny users="?" />
</authorization>

When I first try to get a page from the application (let's say ot.aspx)
it redirects to the sigin.aspx page.

Once logged I execute Session.Abandon

Now, I can get the "ot.aspx" page again without having to sig in

It would only ask me again to sigin until I close the browser, wht?

Best Regards
Fabio Cavassini
http://www.pldsa.com

Jan 18 '06 #2

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

Similar topics

14
4071
by: Darrin J Olson | last post by:
I am trying to end a session for a site without having to completely close the browser to end it. When I access the site and log in it works fine. If I log out and in with a different account without closing the browser, I get the first session's information. Also, if a open another browser and log in with a different account I get the session from the first browser. I've tried deleting all cookies and any cached pages, but still get the...
9
2451
by: William LaMartin | last post by:
I have a problem, mentioned here before, of Session and Application variables disappearing at one site but not at others or on my development computer. The problem is illustrated by an example at http://www.lamartin.com/dotnet/sessiontestset.aspx, were I set Session, Application and Cache variables on the first page and then on the second page view them as the second page is refreshed every five seconds. Before 10 refreshes, the...
5
9126
by: news.microsoft.com | last post by:
Hi everyone, I need some help (may be in the form of some sample code) for the subject question. I have an ASP.NET/C# application. I need to do quite a few tasks when the session ends. I don't want to depend on the session timeout factor since it may end too soon or it may hang around too long. I can't find any event that fires when the browser closes. The Session_End event handler in the Global.asax does not execute until the...
8
1744
by: ari | last post by:
hey all, i'm trying to make my app as stateless as possible. is it ok to create a dataset and store in viewstate and whenever the user decides to select a from that dataset, to move from viewstate, to session, and on the details page back to viewstate. Or does that sound like too much work? thanks, ari
4
1888
by: Hugo Flores | last post by:
Hi all, I noticed that there are three methods that can remove session variables Session.Clear() Session.RemoveAll() Session.Abandon() Now my question as is stated on the subject, what is the best way to end a session?
2
1926
by: Donald Scott | last post by:
We are having a problem with sessions ending sooner then they should. We have a two server web garden, both servers have identical machine keys. I'm storing session state in Sql Server. Sessions expire in 20 minutes even though I have changed the settings in the web.config, for both the forms authentication as well as the session. I have the timeout set for 90, but still times out in 20 minutes. I copied the entire website down to my...
2
1213
by: Big Daddy | last post by:
I have an ASP.NET application where the user will be right in the middle of doing something and the sessions ends and then it blows up because I have stored some things in the Session hashtable. I know it's not ending because of the usual culprits (timeout, web.config file changing, anti-virus software scanning the dll, etc.). So I am wondering if there is a way to ask IIS why the session ended. It could be programmatically or it could...
10
1425
by: stathisgotsis | last post by:
Hello everyone, I am having a brain fart or something, why won't this work? test.php: <?php session_start(); $_SESSION='test'; header("Location: test2.php"); exit();
6
6071
by: javelin | last post by:
In ASP classic pages, I want to know if it's possible to prevent session variables from becoming zero length strings? I have tried setting the Session.Timeout to a large value, but alwas, after 20 minutes, my session variable times out. I also tried setting the session timeout in IIS manager to a high value, but this did no good either. I just want to allow one particular session variable to last a long time. Any other suggestions? \
2
1184
by: Polaris | last post by:
Hi Experts: In ASP.Net, is there a class/function for ending a session? Will this function invoke Session_End (in the Global class)? Thanks in advance! Polaris
0
8776
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 synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9449
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
9236
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 most users, this new feature is actually very convenient. If you want to control the update process,...
0
9182
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6735
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6031
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4550
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 the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4809
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3261
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

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.