Professional Web Applications Themes

Redirect Session Timeout - ASP.NET Security

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? ...

  1. #1

    Default Redirect Session Timeout

    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
    Marcus Olsson Guest

  2. #2

    Default Re: Redirect Session Timeout

    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
    [url]http://www.lagash.com[/url]



    "Marcus Olsson" <anonymousdiscussions.microsoft.com> wrote in message
    news:269F4AA0-73BD-4E44-96B0-756A6FA744EFmicrosoft.com...
    > 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

    Hernan de Lahitte Guest

Similar Threads

  1. how to specify session timeout
    By j2eesatish in forum Macromedia Flex General Discussion
    Replies: 1
    Last Post: September 25th, 02:28 AM
  2. Session Timeout
    By Natty Gur in forum Dreamweaver AppDev
    Replies: 20
    Last Post: September 3rd, 02:53 PM
  3. Replies: 0
    Last Post: June 17th, 02:00 AM
  4. IIS Session timeout
    By Tim Phelps in forum ASP
    Replies: 1
    Last Post: July 31st, 12:43 AM
  5. How to set session timeout
    By Geigho in forum ASP.NET General
    Replies: 6
    Last Post: July 14th, 09:14 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139