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

Authentication/Automatic redirection question

Hello

I would like to find out if there is a way to SignOut() the user and
redirect the browser back to login page after time out period expired

I've added these settings to my web.config file but they don't seem to take
any effect

<authentication mode="Forms">

<forms name="frmLogin.aspx" loginUrl="/frmLogout.aspx?timeout=1" timeout="1"
slidingExpiration="true" requireSSL = "false"></forms>

</authentication>

I know that there is a "refresh" metatag that I can use like this one

<meta http-equiv="refresh" content="30; url=frmLogout.aspx?timeout=1">

but that refreshes the page no matter if the users actively typing something
into the textboxes on the page or if they are idle.

Is there something I can do to accomplish this?

Thank you

David
Nov 18 '05 #1
3 2742
It'll have to be done on the client side, because there is no way you can
control their browser like that on the server side, unless you handle this
through page transitions.

You should be able to write some javascript that runs the timer (which would
be a stored time in the system), then for the page any
onClick/onMouseOver/etc on controls would reset this timer (put the current
time). If the timer exceeds what you want, you change the page on them.

You'd have to have a javascript function running in the background the whole
time, don't know what that would do as far as client performance, and they
may not like having their page redirected because they read over the form
real well but didn't move the mouse or hit a key.

"David Kleyman" <dk******@benow.com> wrote in message
news:ub**************@TK2MSFTNGP09.phx.gbl...
Hello

I would like to find out if there is a way to SignOut() the user and
redirect the browser back to login page after time out period expired

I've added these settings to my web.config file but they don't seem to take any effect

<authentication mode="Forms">

<forms name="frmLogin.aspx" loginUrl="/frmLogout.aspx?timeout=1" timeout="1" slidingExpiration="true" requireSSL = "false"></forms>

</authentication>

I know that there is a "refresh" metatag that I can use like this one

<meta http-equiv="refresh" content="30; url=frmLogout.aspx?timeout=1">

but that refreshes the page no matter if the users actively typing something into the textboxes on the page or if they are idle.

Is there something I can do to accomplish this?

Thank you

David

Nov 18 '05 #2
David,
If a user's forms authentication cookie has expired, the next time they try
to access a protected resource, they will be signed out and automatically
taken to the login page. Does that help?

"David Kleyman" <dk******@benow.com> wrote in message
news:ub**************@TK2MSFTNGP09.phx.gbl...
Hello

I would like to find out if there is a way to SignOut() the user and
redirect the browser back to login page after time out period expired

I've added these settings to my web.config file but they don't seem to take any effect

<authentication mode="Forms">

<forms name="frmLogin.aspx" loginUrl="/frmLogout.aspx?timeout=1" timeout="1" slidingExpiration="true" requireSSL = "false"></forms>

</authentication>

I know that there is a "refresh" metatag that I can use like this one

<meta http-equiv="refresh" content="30; url=frmLogout.aspx?timeout=1">

but that refreshes the page no matter if the users actively typing something into the textboxes on the page or if they are idle.

Is there something I can do to accomplish this?

Thank you

David

Nov 18 '05 #3
Not really

I need page to be redirected automatically after timeout expires

Also
what's the difference between using Response.redirect("page.aspx") and
Server.transfer("page.aspx")?
if I use Server.transfer request does not stay authenticated between the
page navigations
Request.IsAuthenticated returns false on the next page

Thank you

David

David
"George Durzi" <gd****@hotmail.com> wrote in message
news:eP**************@tk2msftngp13.phx.gbl...
David,
If a user's forms authentication cookie has expired, the next time they try to access a protected resource, they will be signed out and automatically
taken to the login page. Does that help?

"David Kleyman" <dk******@benow.com> wrote in message
news:ub**************@TK2MSFTNGP09.phx.gbl...
Hello

I would like to find out if there is a way to SignOut() the user and
redirect the browser back to login page after time out period expired

I've added these settings to my web.config file but they don't seem to

take
any effect

<authentication mode="Forms">

<forms name="frmLogin.aspx" loginUrl="/frmLogout.aspx?timeout=1"

timeout="1"
slidingExpiration="true" requireSSL = "false"></forms>

</authentication>

I know that there is a "refresh" metatag that I can use like this one

<meta http-equiv="refresh" content="30; url=frmLogout.aspx?timeout=1">

but that refreshes the page no matter if the users actively typing

something
into the textboxes on the page or if they are idle.

Is there something I can do to accomplish this?

Thank you

David


Nov 18 '05 #4

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

Similar topics

1
by: Hugh McLaughlin | last post by:
Hello Everyone and thanks for your help in advance. I recently installed Visual Studio 2003 and .Net 1.1. I then converted one of my applications to 2003. However, I am running into a probelm...
2
by: phreeskier | last post by:
i want to implement authorization with windows authentication and don't have the slightest clue of how to do this implementation. the basic windows authentication for this .NET application is...
52
by: Gerard M Foley | last post by:
Can one write a webpage which is not displayed but which simply redirects the user to another page without any action by the user? Sorry if this is simple, but I am sometimes simple myself. ...
1
by: www.MSmobiles.com | last post by:
Hi! I am using something like this in web.config : <authentication mode="Forms"> <forms name=".MSMOBILES_COM___COOKIE" loginUrl="login.aspx" protection="All" timeout="30" path="/">
3
by: Stephanie Stowe | last post by:
I am new to ASP.NET having come from ASP classic background. I need to understand authentication. I have a server running IIS which contains an ASP.NET app. On IIS the app has both anonymous and...
7
by: Trollpower | last post by:
Hello NG, i need to know how i can pass parameters to the loginpage if i use authentication mode Forms. I need to pass different paramaters, such as a different redirection url, strings and...
6
by: Ming Zhang | last post by:
Hi guys, I have couple of ASP.NET applications that only support digest windows authentication, and credentials are managed in a central AD. When users login to one app, they can easily navigate...
2
by: Tosco | last post by:
I used to use WebBrowser in VB6, and now I want to learn how to use WebRequest in vb.net, but I'm having 2 problems. 1) Is it normal that the automatic redirection doesn't work when the page...
8
by: jonmundsack | last post by:
I have an intranet site on my LAN which has "anonymous access" turned OFF, and "integrated Windows authentication" turned on. This allows me to access the "AUTH_USER" server variable, which I use...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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...
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
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...
0
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.