Re: redirecting to main page

From: Brock Allen (ballen_at_NOSPAMdevelop.com)
Date: 03/30/05


Date: Wed, 30 Mar 2005 07:35:16 -0800

You should look into the <authorization> element in web.config -- this allows
you to specify who is and isn't allowed to see certain pages and it automatically
redirects the user to a login page (or any page you specify) if they're not
authorized:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpgenref/html/gngrfauthorizationsection.asp

And here's a way more in depth look:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnnetsec/html/SecNetch03.asp

-Brock
DevelopMentor
http://staff.develop.com/ballen

> I am working on asp.net application
> what should I do so that if any user directly types the url other than
> "mainpage.aspx" of my application, he should be directed to
> "mainpage.aspx".
> I am managing user access by enabling and disabling the links on the
> web
> page depending on the user.
> cheers
>



Relevant Pages

  • Re: User.IsInRole with * wildcard, web.sitemap etc.
    ... my scenario is fairly non-standard, i would accept that, although my reports page is invaluable: it dynamically generates UI controls to match parameters for any SP, and then binds the results to an enhanced GridView with built-in excel export etc.. ... User.IsInRole with * wildcard, ... You use the <authorization> element in web.config for that - the sitemap just uses this information - and the role attribute in the sitemap file allows to override the information found in the authorization element for visual presentation. ... since i'm using the querystring to specify a sproc, ...
    (microsoft.public.dotnet.framework.aspnet.security)
  • Re: last ot again :White House defends money for banks
    ... Gee, if Congress isn't happy how the money is being used, why didn't they specify it in the authorization? ...
    (rec.outdoors.rv-travel)
  • Re: last ot again :White House defends money for banks
    ... Gee, if Congress isn't happy how the money is being used, why didn't they specify it in the authorization? ...
    (rec.outdoors.rv-travel)
  • Re: Authorization based on roles or directory access?
    ... Your authorization sections in the web.config file can specify a script ... But the roles attribute in the sitemap works for this authorization ... "For navigation node ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: User.IsInRole with * wildcard, web.sitemap etc.
    ... You don't specify any authorization requirements in web.sitemap!!! ... You use the <authorization> element in web.config for that - the sitemap just uses this information - and the role attribute in the sitemap file allows to override the information found in the authorization element for visual presentation. ...
    (microsoft.public.dotnet.framework.aspnet.security)