web config asp,net applications and web services.

M

Martin

Hi.

Can somebody tell me if changes made to the web.config file of a running
asp.net web application cause the application to be re-started.

The specific change I had in made was a change to the <trace> element of the
web.config file.

I am under the impression that this does re-start the asp.net web
application.


also would an identical change the the web.config file of an asp.net web
service cause the web service to be re-started???


thank you for your time..

cheers

martin
 
R

Rick Strahl [MVP]

Hi Martin,

ANY change to web.config causes the app to be restarted which affects both
Web Forms and Web Services.

Generally this should not be a problem, unless you're keeping some sort of
state on the server. If you're worried about Session objects you might try
StateServer for more persistent state storage.

+++ Rick ---

--

Rick Strahl
West Wind Technologies
http://www.west-wind.com/
http://www.west-wind.com/weblog/
 
R

Raheel Hussain

if you do any change to the web.config then the corresponding
application will immediately load the web.config file, but do not
restart.

the asp.net framework cashes all the settings of this file and
automatically detects and loads the settings when some modifications are
made to it, hense again takes them to the cache.


regads
raheel
 
R

Rick Strahl [MVP]

Raheel,

This is not correct. A change to web.config causes the AppDomain of the
running application to be unloaded and a new AppDomain to be loaded with
ASP.Net runtime in it. Note that it's the AppDomain that the runtime is
hosted in (one for each virtual directory) that gets restarted not the
process.

The old AppDomain finishes running out requests while a new one is started
up to capture all new incoming requests so there may be two simultaneous
instances of the same application running for a short period of time.

+++ Rick ---


--

Rick Strahl
West Wind Technologies
http://www.west-wind.com/
http://www.west-wind.com/weblog/
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top