DotNetNewsgroup.com  
web access to complete list of Microsoft.NET newsgroups
   home   |   control panel login   |   archive  |  
 
  carried group
academic
adonet
aspnet
aspnet.announcements
aspnet.buildingcontrols
aspnet.caching
aspnet.datagridcontrol
aspnet.mobile
aspnet.security
aspnet.webcontrols
aspnet.webservices
assignment_manager
datatools
dotnet.distributed_apps
dotnet.general
dotnet.myservices
dotnet.nternationalization
dotnet.scripting
dotnet.security
dotnet.vjsharp
dotnet.vsa
dotnet.xml
dotnetfaqs
framework
framework.clr
framework.compactframework
framework.component_services
framework.controls
framework.databinding
framework.drawing
framework.enhancements
framework.interop
framework.odbcnet
framework.performance
framework.remoting
framework.sdk
framework.setup
framework.webservices
framework.windowsforms
framework.wmi
frwk.windowsforms.designtime
lang.csharp
lang.jscript
lang.vb
lang.vb.controls
lang.vb.data
lang.vb.upgrade
lang.vc
lang.vc.libraries
  
 
start date: Fri, 3 Aug 2007 11:37:50 +0300,    posted on: microsoft.public.dotnet.framework.aspnet        back       

Thread Index
  1    Andrea Anastasescu anastasescu_a.at.yahoo.dot.com


external configuration sections - refresh after changing content   
Hi everybody,

Inside the web.config of my application I have some custom sections. I have 
my own handlers for these sections, and their content is in external files.
My problem is that ConfigurationManager do not detects that these external 
files are changed.
In case that I "touch" the web.config file, just save it or something, the 
content of the files are re-read.
Is there any possibility to make ConfigurationManager detect that these 
external files are modified and do a refresh automatically, or what is your 
advise, what can I d to have access to the new content of these sections?


Web.config look smth similar to:
 <configSections>
  <section name="content"  type="MyConfig.XmlConfigurationHandler, 
MyConfig"/>
 </configSections>
<content fileName="ContentSite.xml"/>
.....
</configuration>

I am accesing the external sections somehow similar to these:

contentSite = ConfigurationManager.GetSection("content") as MyContentType;
I tried also accesing them as:

contentSite = WebConfigurationManager.GetSection("content") as 
MyContentType;

I read about restartOnExternalChanges="true/false" attribute for sections, 
but it was a little bit controversial whether it is appliable for web 
applications, and anyway I tried it and it is not working for me.



Thank you in advance,

Andrea
Date:Fri, 3 Aug 2007 11:37:50 +0300   Author:  

Google
 
Web dotnetnewsgroup.com


COPYRIGHT ?2005, EUROFRONT WORLDWIDE LTD., ALL RIGHT RESERVE  |   Contact us