When are the FormsAuthentication class' configuration settings read?



Hi,

I'm writing a HttpModule which is going to require certain settings in
the FormsAuthentication configuration (for example, I need to ensure
enableCrossAppRedirects = true).

Now my best effort so far has been to run through the configuration
settings I require and raise exceptions if the web.config hasn't been
set up correctly. Ideally though, I'd like the sites this module will
go into not to have to paste boilerplate settings into web.config, and
instead just fix the settings from within my HttpModule's code at
Init().

Is this possible?

Obviously just changing the FormsAuthentication class' properties
doesn't work as they're read only (though I guess using a reflection
hack might be an option..?).

I've tried opening the config file using WebConfigurationManager,
changing settings and doing Save(), but these new values don't seem to
be reflected on the FormsAuthentication class' properties

Can anyone with some inside / in-depth knowledge of the
FormsAuthentication class give me some clues as to how this hangs
together?

thanks,
Matt

.



Relevant Pages

  • When are the FormsAuthentication class configuration settings read?
    ... Now my best effort so far has been to run through the configuration ... settings I require and raise exceptions if the web.config hasn't been ... Obviously just changing the FormsAuthentication class' properties ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Computer vs. User configuration
    ... "It is not that you can not configure a Group Policy with settings enabled ... Your explanation of a top level GPO with no override filtering down to ... scenario I can imagine having both user and computer configuration settings ...
    (microsoft.public.windows.group_policy)
  • Re: appsetting in class doesnt work
    ... an appsettings section. ... <!-- This section defines the logging configuration for ... Dim cnfg As System.Configuration.Configuration ... settings enter in the designer. ...
    (microsoft.public.dotnet.languages.vb)
  • Re: appsetting in class doesnt work
    ... added an appsettings section. ... <!-- This section defines the logging configuration for ... Dim cnfg As System.Configuration.Configuration ... the settings enter in the designer. ...
    (microsoft.public.dotnet.languages.vb)
  • Re: appsetting in class doesnt work
    ... added an appsettings section. ... <!-- This section defines the logging configuration for ... Dim cnfg As System.Configuration.Configuration ... and the settings enter in the designer. ...
    (microsoft.public.dotnet.languages.vb)