Re: Custom Forms role-based security and HttpModules
From: Larry Lau (larry_the_great@yahoo.com)
Date: 03/31/03
- Previous message: Larry Lau: "Re: Microsoft Certificate Services"
- In reply to: Sangi: "Custom Forms role-based security and HttpModules"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
From: larry_the_great@yahoo.com (Larry Lau) Date: 31 Mar 2003 01:39:03 -0800
I think u can't have different security mechanism in subdirectory
other than the one u use in the root directory. global.asax is used
for the whole application domain, i.e. the directroy.
If you really need another mechanism, is it possible turn ur
subdirectory as a root directory?
say u have
default web site
|_virtual 1
|_subdir,
then turn it to
default web site
|_virtual 1
|_virtual 2
For the http module, the following may help:
http://msdn.microsoft.com/library/en-us/dnnetsec/html/SecNetAP04.asp?frame=true
"Sangi" <sangi@msn.com> wrote in message news:<Xwrga.51905$7y3.1634770@twister1.libero.it>...
> Hi all,
> I've seen quite a few examples that handle the Application's
> AuthorizeRequest event in the global.asax file to implement a Forms
> role-based security. While this surely works fine, I can't use this
> approach, for two reasons:
> 1) I dont' want to implement this for all the site, but only for part of it,
> and use another security mechanism for the rest of the site. Let's say that
> I want to use my own custom Forms role-based security for a sub-directory,
> and the standard Windows or Forms security for the rest.
> 2) The second reason is that I'm plugging my own sub-site into another
> existent site, and I dont' have access to the site's global.asax/asax.vb
> file, so I can't handle the AuthorizeRequest there.
>
> So my question is: would it work if I handled the AuthorizeRequest from a
> custom HttpModule? Could I install it only for a folder, by registering it
> into that sub-folder's web.config, and continue to use the default security
> in the rest of the site, where my module is not registered?
>
> Also, say that the site already has a custom security implementation in its
> Global.asax file, would my module override it for the folder where it has
> been registered, or would the Global.asax implementation come last, and thus
> override what I do in my module, and for the entire site? I'm not sure how
> the ASP.NET pipeline works in detail. I've read all the articles on MSDN
> Magazine and many others, but couldn't find answers for all these questions.
> Can anyone give a hint? Thanks a lot!
> -- Sangi
- Previous message: Larry Lau: "Re: Microsoft Certificate Services"
- In reply to: Sangi: "Custom Forms role-based security and HttpModules"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|