How To Determine Permission Requirements for a Resource?

From: John Gordon (john.gordon.156699@||No-Spam||wamu.net)
Date: 04/14/03


From: "John Gordon" <john.gordon.156699@||No-Spam||wamu.net>
Date: Mon, 14 Apr 2003 11:58:54 -0700


The Gist: How do I check from a login page if the user is
being redirected to the login page because he/she did not
have permissions to view a requested resource? I'm
currently doing this by checking if the user is
authenticated already and if there is a ReturnUrl in the
querystring. This strategy works, unless the user
bookmarks the login page that contains the returnUrl in the
querystring. Is there another way to find out what I want
without checking for whether or not there is a returnUrl in
the querystring? I'm thinking that I could do something in
the Application_AuthorizeRequest to find out what page was
being requested and to get the roles that are allowed to
view it.

Thanks!



Relevant Pages

  • Re: Logged in - Session timeout
    ... You have that info in a session, and then simply send them to: ... take any querystring info with it that you may need.... ... Now the users times out and you redirect them to your login page, ...
    (microsoft.public.inetserver.asp.general)
  • Re: Logged in - Session timeout
    ... "Targa" wrote ... ... take any querystring info with it that you may need.... ... Now the users times out and you redirect them to your login page, ...
    (microsoft.public.inetserver.asp.general)
  • Code to return to calling page
    ... I have login links on a number of pages in my site. ... preserve the variables on the querystring. ... dim sQS ...
    (microsoft.public.inetserver.asp.general)
  • RE: request page I cant have -> goes to login
    ... logged in also - and in that case I do want them on the login page. ... "ReturnUrl" querystring, so that it can redirect the user back to the ... This posting is provided "AS IS" with no warranties, and confers no rights. ...
    (microsoft.public.dotnet.framework.aspnet.security)
  • Re: Q: form authentication complete?
    ... This will work by parsing a querystring in Login page's URL. ... also some entries in web.config that have to be set. ...
    (microsoft.public.dotnet.framework.aspnet)