Re: get redirect url before login

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Igor (istavnit_at_ameritech.net)
Date: 02/05/04


Date: Thu, 05 Feb 2004 05:55:24 GMT

I suggest using HTTP Module for authentication and authorization. If
you implement HTTP module by including a special line in webconfig,
all requests will go through one central place where you will be doing
the authentication and authorization. All of the pages in your app
will not have to worry about authorization or athentication, because
you can handle it all the way you want in one function. You can
inspect every incoming request and redirect people to login page and
save their original requested page and do it in any way you like,
using either cookies or session or a combination of two.

On Wed, 4 Feb 2004 15:59:38 -0600, "Curt_C [MVP]"
<software_AT_darkfalz.com> wrote:

>Request.QueryString["ReturnUrl"]
>
>--
>Curt Christianson
>Owner/Lead Developer, DF-Software
>www.Darkfalz.com
>
>
>"feng" <anonymous@discussions.microsoft.com> wrote in message
>news:a55301c3eb63$9bb361e0$a401280a@phx.gbl...
>> My users who try to access a page before login are
>> redirected to my login page. Then after they successfully
>> login, my login page will redirect the user to the page
>> they intended to go through this line:
>>
>> FormsAuthentication.RedirectFromLoginPage(strUserName,
>> False)
>>
>> What I want now is that I want to capture the origional
>> url that the use intented to go BEFORE the user logs in. I
>> don't mind to do this in the login page, but this has to
>> be done in the page load, before the user's login info
>> typed in.
>>
>> I know there is a function:
>>
>> FormsAuthentication.GetRedirectUrl(strUserName, False)
>>
>> but this won't work for me because it expect user name.
>>
>> Any ideas?
>>
>> Thanks a million!
>>
>
>



Relevant Pages

  • Re: Authentication login screen appears on both frames of the framset
    ... If you're using forms authentication when a user is not authorized to see a ... page they are automatically redirected to the login page. ... Since both of your frames are checking if the user is authorized they each ... > I am using the authentication and authorization mechanism, ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: authorization problems
    ... 401 is status code reserved in RFC for failed server security negotiations. ... your IE would pop up login screen asking for username and password. ... > When I use Windows authentication, response.StateCode can get 401, So I ... >> authorization caused problems. ...
    (microsoft.public.dotnet.framework.aspnet.security)
  • Re: asp password
    ... If you use Forms authentication it will automatically redirect users to a ... login page you specify if they are not logged in. ... Web.Config or you could put them in an xml file or a database. ... This section sets the authorization policies of the application. ...
    (microsoft.public.dotnet.framework.aspnet.security)
  • Re: .Net Authorization and NTFS permissions
    ... If i clearly understand what u mean, u would like to log requests. ... using Windows authentication, ... > We get inconsistent application behavior on Authorization based on NTFS ...
    (microsoft.public.dotnet.security)
  • Re: Form Level Authentication
    ... there is authorization tag which denies access to the pages ... > Which redirects all the pages to login page if not authenticated. ... > Can we open few pages which does not need authentication. ...
    (microsoft.public.dotnet.framework.aspnet)