Ask a Question related to ASP.NET Security, Design and Development.
-
mortb #1
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
-
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... -
mortb #2
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



Reply With Quote

