473,327 Members | 2,016 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,327 software developers and data experts.

form authentication slidingExpiration not sliding

framework 1.1

in our webapp, we are using forms authentication.

=================
Auth Section from web.config
=================

<authentication mode="Forms">
<forms name="loginauth" path="/" loginUrl="loginauth.aspx"
protection="All" timeout="5" slidingExpiration="true">
</forms>
</authentication>

After sign in, I use the following code to get the expiration date/time from
the current authentication cookie, but the expiration time does not change as
I refresh the page, or ruturn after visiting other pages on the site. The
current time does change with each hit of the debug page. This is causing an
issue because our user is getting timed out.

==================
output from debug page
==================

Current Time: 10/11/2004 11:53:31 AM
Auth Cookie Expires: 10/11/2004 12:52:27 PM
Auth User Data:

==================
Source that generate the output
==================
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
Dim ctx As HttpContext = HttpContext.Current

If ctx.Request.IsAuthenticated Then
Dim id As FormsIdentity = CType(ctx.User.Identity, FormsIdentity)
authCookie = id.Ticket
End If

Response.Write("<br><br>Current Time: " & Now().ToString)
Response.Write("<br>Auth Cookie Expires: " &
authCookie.Expiration.ToString)
Response.Write("<br>Auth User Data: " & authCookie.UserData)
End Sub
Jul 21 '05 #1
0 2124

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

Similar topics

1
by: Franz Gsell | last post by:
Hi together, I have got a "sliding" form which becomes active when a user clicks on a button in another form. In my function which starts the "sliding" mechanism is a call to this.Show() to make...
1
by: Shimon Sim | last post by:
Hi Working on a project that requires Form authentication. My client reports that he is thrown out to log in page every 5-10 min. I can't understand why. I don't get the same behavior on my...
2
by: pv | last post by:
Hi everyone, I need help with following scenario, please: Users are accessing same web server from intranet (users previously authenticated in Active Dir) and from extranet (common public...
0
by: Ben S | last post by:
framework 1.1 in our webapp, we are using forms authentication. ================= Auth Section from web.config ================= <authentication mode="Forms"> <forms name="loginauth"...
4
by: npbuggia | last post by:
hey, I'm trying to configure it so when users log in they don't ever have to log in again from the same machine (okay, maybe within a month or something). is there a way to do this with the...
2
by: Sumi | last post by:
Hi, I've the following code in my web.config - <authentication mode="Forms"> <forms loginUrl="Login.aspx" protection="All" timeout="30" name=".ASPXAUTH" requireSSL="false"
2
by: nick | last post by:
I have an Asp.Net 2.0 application using form authentication. I want the html pages be protected by the authentication system too. The accessing of html files need to be authenticated in my local...
0
by: robert | last post by:
I have noticed in .net 2 that when authenticating a user, setting the cookie using either redirectfromloginpage or setauthcookie, specifying true for the persistent parameter that the cookie is...
5
by: drasko | last post by:
Hi, I have the following structure of my web-site root | -folder1 (secure) | -folder2 (secure) Now, as you can see, both folders are secure and need to have
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
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...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
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...

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.