ConfigurationManager and web.config and ASP.NET refresh curiosity

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Hi all,

I was playing with the new ConfigurationManager class in the Feb CTP drop of
VS 2005 and I noticed that if you make changes to the configuration inside of
an ASP.NET page, those changes are immediately written to the web.config when
you say Configuration.Save() but if I then try to access them, they do not
appear to refresh within the request.

Not completely unexpected I suppose but I was wondering if anyone knew if
this is the way this is supposed to work or if the current request should
have picked up the changes?

Basically I added a new sqlCacheDependency using the configuration classes
and then called the constructor of SqlCacheDependency with the corresponding
information and it threw an exception because it couldn't find the setting I
just wrote out to the web.config. I got around it by doing a
response.redirect back to the page again and then executing the constructor
which worked but if the changes won't take until a new page loads then I'd
just like to know that is the case.

Thanks in advance for any help on this.

Jay
.



Relevant Pages

  • Re: Java Logger
    ... I am not using a console Handler in the code, ... it is not Java code. ... reading in the initial configuration. ... In other words, copy the code posted by Knute to the constructor of a class, say ...
    (comp.lang.java.programmer)
  • Perl Class simple problem
    ... I'm trying to write a class for configuration values for ... different sites so that they can use the same conf class, ... I create an object and pass a value to my constructor like this: ... End of Perl Code ...
    (perl.beginners)
  • Class usable from all other class
    ... I create a class to manage configuration. ... For this, I have a constructor that create a dataset with all my parameters, ... And want to have a constructor (so impossible to have statict method) to ... retrieve all parameters. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Nonce and Created Values. General Questions
    ... > I have set the replaydetection setting in my config file to false, ... > constructor of my usernamemanager implementation sets everything to base ... accepts the configuration node list: ... UsernameTokenManager, would be: ...
    (microsoft.public.dotnet.framework.webservices.enhancements)
  • Re: wpa_supplicant gets points for trying, I suppose....
    ... Reading configuration file '/etc/wpa_supplicant.conf' ... Setting scan request: 0 sec 0 usec ... Failed to initiate AP scan. ...
    (freebsd-current)