Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Visual Studio.NET / Enterprise Tools / December 2004

Tip: Looking for answers? Try searching our database.

How to make the config change effective immediately?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Michael - 03 Dec 2003 01:19 GMT
I have a question regarding EIF , when the EnterpriseInstrumentation config
file is changed, the effect is immediate, how EIF achieve this? Does that
mean EIF will always read the config file when calling the raise? Or it has
a cached version and use some kind of notification mechanism to notify EIF
to reload whenever a changes on the config file occurs?

The reason I am asking is: I am wondering how to let the app know the config
is changed without reading the config file again and again? My understanding
is that the IO access is slow. In a situation that we use a TraceSwitch in
config file to decide whether or not we should trace, will this repeatedly
IO access cause performance problem?

Thanks;

Michael
David Keogh [MSFT] - 03 Dec 2003 16:36 GMT
When an instrumented app is loaded, EIF puts a filewatcher on the config
file to be alerted to changes.  However, we always maintain an in-memory
lookup of configuration information so that when you call event.raise() it
is an optimized lookup to determine whether to do anything; we don't go
directly to the config file when firing events for performance reasons.  We
only re-load the config file when we detect that it has changed, or if the
app is restarted.

David [MSFT]

--------------------
| From: "Michael" <michael_chi@sbcglobal.net>
| Subject: How to make the config change effective immediately?
[quoted text clipped - 26 lines]
|
| Michael
news.microsoft.com - 05 Dec 2003 17:14 GMT
David,

Sounds exactly what we will do to our config file, we have a service that
will run day in and day out. And we want to be able to change its
settings( such as tracing level)  from
a config file without stopping it (   I believe if we use the app.config, th
framework will reset the app domain and reload the program, is that right?),
so use the same approach as EIF should work nicely. Thanks a lot;

Michael

> When an instrumented app is loaded, EIF puts a filewatcher on the config
> file to be alerted to changes.  However, we always maintain an in-memory
[quoted text clipped - 41 lines]
> |
> | Michael
David Keogh [MSFT] - 05 Dec 2003 18:25 GMT
Only ASP.NET web apps auto restart when the web.config file is changed.  
Regular EXEs such as Windows Services don't restart, but also won't pickup
config changes until it is restarted.  So to have dynamically reloaded
config without restarting the app, you'll need a separate config file.

David [MSFT]

--------------------
| From: "news.microsoft.com" <kwongyuchi@hotmail.com>
| References: <OBF85tTuDHA.560@TK2MSFTNGP11.phx.gbl>
<RYKcIvbuDHA.652@cpmsftngxa06.phx.gbl>
| Subject: Re: How to make the config change effective immediately?
| Date: Fri, 5 Dec 2003 11:14:11 -0600
[quoted text clipped - 61 lines]
| > |
| > | Michael
news.microsoft.com - 05 Dec 2003 20:46 GMT
David,

Appreciate your quick response. Just for followup, will Web service behave
the same as web apps?  I guess it will. Do you know some  MSDN articles I
can refer to  further understand what happen when a config file is modified
for each type of projects?

Thanks ;

Michael

Thanks again. Do you have a reference to how the config file works
> Only ASP.NET web apps auto restart when the web.config file is changed.
> Regular EXEs such as Windows Services don't restart, but also won't pickup
[quoted text clipped - 79 lines]
> | > |
> | > | Michael
Mike Hayton [MS] - 07 Dec 2003 03:08 GMT
Im not sure on the articles question, but WebServices (hosted in AspNet) be
restarted.

The general rule is any AppDomain (whether WebService, WebApp, singeton
.NET Remoting object, etc) that is being hosted in ASP.NET will be
restarted if the ASP.NET detects a change to the web.config or a change in
Bin directory.

Hope this helps.

Mike

--------------------
| David,
|
[quoted text clipped - 100 lines]
| > | > |
| > | > | Michael

Signature

This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm

Mayank Thapak - 06 Dec 2004 18:07 GMT
Hello,
Can you please send me a code.
I have a config file. which is placed at another location.
i want to implement the filewatcher on that.
and when ever anybody change it the modified contain reflected.
please do needful for me

Thanks & Regards
Mayank Thapak

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.