Redirect Session Timeout

M

Marcus Olsson

Hi!

When my ASP.NET app timeout I want it to redirect to a page that tells the user that they are timed out. I don't want them to just end up att the default Login page just like that.

In web.config I can set loginUrl to a certain URL. If there is a timeout, that page is used. Q: Is that loginUrl-page used in other cases too, or only when timeout?

What I want is one Login page and another page which you are redirected to if the app does a timeout. Which is the smartest way to do this?

<forms name="formsmy" path="/" loginUrl="login.aspx" protection="All" timeout="1" SlidingExpiration="true"/>

I have searched for an answer on internet but there seemes to be no clear answer. If you have a link to a good page or some ideas, I would appreciate it much!

Thanx!

Regards
/marcus
 
H

Hernan de Lahitte

One idea from the top of my head is this:
When you session expires, the Session_End (global.asax) event is fired.
Here, you can redirect the user to a page with you timeout message. It's
important to place this page on a folder outside the forms path. This folder
should have anonymous access. On your web.config file, try something like,

<location path="Timeout.aspx" allowOverride="false">
<system.web>
<authorization>
<allow users = "*" />
</authorization>
</system.web>
</location>


--
Hernan de Lahitte - MSDE
Lagash Systems S.A. - Buenos Aires, Argentina
http://www.lagash.com



Marcus Olsson said:
Hi!

When my ASP.NET app timeout I want it to redirect to a page that tells the
user that they are timed out. I don't want them to just end up att the
default Login page just like that.
In web.config I can set loginUrl to a certain URL. If there is a timeout,
that page is used. Q: Is that loginUrl-page used in other cases too, or only
when timeout?
What I want is one Login page and another page which you are redirected to
if the app does a timeout. Which is the smartest way to do this?
<forms name="formsmy" path="/" loginUrl="login.aspx" protection="All"
timeout="1" SlidingExpiration="true"/>
I have searched for an answer on internet but there seemes to be no clear
answer. If you have a link to a good page or some ideas, I would appreciate
it much!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,767
Messages
2,569,572
Members
45,045
Latest member
DRCM

Latest Threads

Top