FormsAthenticaton -- Sometimes returnurl is not set

Ask a Question related to ASP.NET Security, Design and Development.

  1. #1

    Default FormsAthenticaton -- Sometimes returnurl is not set

    Hi,

    I have a function in my webapp that the user push a button to get a URL to
    the page he's on.
    The prupose is that the user may store the URL and later paste it in to the
    adress field in IE.
    Since the appplicaiton uses FormsAuthentication the user is redirected to
    the login page if he is not logged on.
    This works fine when pasting the adress into a window in which the user
    previously has been logged on to the webapp and pressed log out. The user is
    redirected to the login page and the ReturnURL querystring paramete is set.
    But when the user starts a new browser and pastes the url into the adress
    field the user is redirected to the login page (fine) but with no ReturnURL
    parameter set (bad). When the user is then logged in he is instead
    redirected to the home page of the application, not the specific page he
    requested when pasting the URL.

    From web.config:

    <authentication mode="Forms">
    <forms name="myweb" path="/" protection="All"
    loginUrl="pages/admin/login.aspx" timeout="400"></forms>
    </authentication>

    <authorization>
    <deny users="?" />
    </authorization>

    Help anyone!

    /mortb


    mortb Guest

  2. Similar Questions and Discussions

    1. FormsAuthentication without the '?ReturnUrl' variable
      Does anyone know if there is a way to prevent FormsAuthentication from adding the '?ReturnUrl' to the login page url ? I am always redirecting...
  3. #2

    Default Re: FormsAthenticaton -- Sometimes returnurl is not set

    Sorry my troubles seems to be due to a redirect in OnSessionStart

    "mortb" <mortb1<noospam<@hotmail.com> wrote in message
    news:u7uZNdr1EHA.2196@TK2MSFTNGP14.phx.gbl...
    > Hi,
    >
    > I have a function in my webapp that the user push a button to get a URL to
    > the page he's on.
    > The prupose is that the user may store the URL and later paste it in to
    > the adress field in IE.
    > Since the appplicaiton uses FormsAuthentication the user is redirected to
    > the login page if he is not logged on.
    > This works fine when pasting the adress into a window in which the user
    > previously has been logged on to the webapp and pressed log out. The user
    > is redirected to the login page and the ReturnURL querystring paramete is
    > set.
    > But when the user starts a new browser and pastes the url into the adress
    > field the user is redirected to the login page (fine) but with no
    > ReturnURL parameter set (bad). When the user is then logged in he is
    > instead redirected to the home page of the application, not the specific
    > page he requested when pasting the URL.
    >
    > From web.config:
    >
    > <authentication mode="Forms">
    > <forms name="myweb" path="/" protection="All"
    > loginUrl="pages/admin/login.aspx" timeout="400"></forms>
    > </authentication>
    >
    > <authorization>
    > <deny users="?" />
    > </authorization>
    >
    > Help anyone!
    >
    > /mortb
    >
    >

    mortb Guest

Posting Permissions

  • You may not post new threads
  • You may 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