Re: When are the FormsAuthentication class' configuration settings read?



Hi,

when you Save the changed config file - the appdomain will recycle and has the changed settings on the next restart.

But you will need a) write access to web.config and b) the add files ACL for the web root for the worker process account - nothing i would recommend from a security perspective.

---
Dominick Baier, DevelopMentor
http://www.leastprivilege.com

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

  • Re: WSE 3.0 settings
    ... I think WSE should apply settings on fly. ... should look for the settings in the calling assembly config file (Calling ... I want to use third party DLL (Or I have to develop a DLL to be used in ...
    (microsoft.public.dotnet.framework.webservices.enhancements)
  • Re: appsetting in class doesnt work
    ... In 2003 I could easily change the config file settings from inside the app, ... Dim cnfg As System.Configuration.Configuration ...
    (microsoft.public.dotnet.languages.vb)
  • Re: Attach and Access config file for Class Library
    ... The way this is *supposed* to work, the app.config would hold the settings ... including the settings for the dll. ... I don't use the config file API. ... and have your app simply load the xml file from the ...
    (microsoft.public.dotnet.framework)
  • re: Dynamic Documentation of Web.Config
    ... I need to document the web.config settings of all the asp.net apps that my company builds/maintains. ... The results will write to the page and link each key/value tag to its corresponding MSDN documentation ... will accessing a web config file with either a streamReader object or xmlReader object to read the file's contents effect the performance or stability of a web app? ... Scenario: I need to document the web.config settings of all the asp.net apps that my company builds/maintains and I would like to code a solution that presents the settings of each app dynamically. ...
    (microsoft.public.dotnet.framework.aspnet.buildingcontrols)
  • Re: appsetting in class doesnt work
    ... the solution and I am trying to obtain settings from the app.config file of ... config file uses the XML format standard of Vs2005. ... Dim s As String = My.Setting.TestSetting ... how do you retrieve the TestSetting value ...
    (microsoft.public.dotnet.languages.vb)