When I’m creating my own authentication mechanism for ASP.NET, at the configuration level can I extend the standard authentication mode attribute?
// Web.config file
<authentication mode="Forms">
I’d like to make something like
<authentication mode="My Custom Special Auth">
and provide appropriate sub-elements.
If this is a good idea I’d need some tips about where to hook into the existing auth element.
Otherwise if it’s best for me to create a new, custom configuration section apart from what is shipped I will do that.
You should set the mode to None and handle everything through your own configuration. Somehow the documentation is more clear for older versions of .Net than the most reasent.
http://msdn.microsoft.com/en-us/library/aa291347(v=vs.71).aspx
None (Custom Authentication)
Specify “None” as the authentication provider when users are not authenticated at all or if you plan to develop custom authentication code. For example, you may want to develop your own authentication scheme using an ISAPI filter that authenticates users and manually creates an object of the GenericPrincipal Class. For more information, see GenericPrincipal Class.
Pros
Cons