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

Session not ending?


I've got the following configuration in Web.config

<authentication mode="Forms">
<forms name=".ASPXCOOKIE" loginUrl="sigin.aspx" protection="All"
timeout="30" path="/">
</forms>
</authentication>
<authorization>
<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 1137
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

<authentication mode="Forms">
<forms name=".ASPXCOOKIE" loginUrl="sigin.aspx" protection="All"
timeout="30" path="/">
</forms>
</authentication>
<authorization>
<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
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...
9
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...
5
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...
8
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...
4
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...
2
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...
2
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...
10
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
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...
2
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
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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
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
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,...
0
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...

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.