By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,742 Members | 2,044 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,742 IT Pros & Developers. It's quick & easy.

prevent aspnet process to restart after web.config is changed

P: n/a
Hi, is the a way to prevent aspnet process to restart after web.config is
modified?
like, waiting for all sessions to close, or not restart at all ?

Thank you,
Daniel
Nov 18 '05 #1
Share this Question
Share on Google+
5 Replies


P: n/a
Hi Daniel:

I don't believe so.

--
Scott
http://www.OdeToCode.com/blogs/scott/

On Thu, 28 Oct 2004 13:36:00 +0200, "Daniel" <bbb> wrote:
Hi, is the a way to prevent aspnet process to restart after web.config is
modified?
like, waiting for all sessions to close, or not restart at all ?

Thank you,
Daniel


Nov 18 '05 #2

P: n/a
Ms should learn from Apache...

"Scott Allen" <bitmask@[nospam].fred.net> wrote in message
news:k4********************************@4ax.com...
Hi Daniel:

I don't believe so.

--
Scott
http://www.OdeToCode.com/blogs/scott/

On Thu, 28 Oct 2004 13:36:00 +0200, "Daniel" <bbb> wrote:
Hi, is the a way to prevent aspnet process to restart after web.config is
modified?
like, waiting for all sessions to close, or not restart at all ?

Thank you,
Daniel

Nov 18 '05 #3

P: n/a
> Ms should learn from Apache...

Yeah, if MS could learn from Apache, they might end up the richest software
company in the world. Oh, wait a second.... they already ARE the richest
software company in the world.

Maybe Apache could learn something from Microsoft?

As for the question, the answer is, a programming platform is designed to be
used a certain way. The way ASP.Net is designed, a change to the web.config
file restarts the application. That is the way it should be used. IOW,
rather than hacking the platform, work with it the way it was designed to be
worked with. This goes for ANY programming platform. If you don't like it,
learn C, and write your own platform. ;-)

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
I get paid good money to
solve puzzles for a living

"Daniel" <bbb> wrote in message
news:Oz**************@TK2MSFTNGP11.phx.gbl...
Ms should learn from Apache...

"Scott Allen" <bitmask@[nospam].fred.net> wrote in message
news:k4********************************@4ax.com...
Hi Daniel:

I don't believe so.

--
Scott
http://www.OdeToCode.com/blogs/scott/

On Thu, 28 Oct 2004 13:36:00 +0200, "Daniel" <bbb> wrote:
Hi, is the a way to prevent aspnet process to restart after web.config ismodified?
like, waiting for all sessions to close, or not restart at all ?

Thank you,
Daniel


Nov 18 '05 #4

P: n/a
Daniel -

You can reference another file for your appSettings, and changes to
that file won't cause the app to restart.

Quote from Paul Wilson's post:
http://weblogs.asp.net/pwilson/archi...4/09/5261.aspx

Web.config:
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<appSettings file="YourSettings.config">
<add key="KeyToOverride" value="Original" />
<add key="KeyToNotOverride" value="Standard" />
</appSettings>
<system.web>
<!-- standard web settings go here -->
</system.web>
</configuration>

YourSettings.config:
<appSettings>
<add key="KeyToOverride" value="Overridden" />
<add key="KeyToBeAdded" value="EntirelyNew" />
</appSettings>

An added benefit is that you can have a dev.config, qa.config,
staging.config, prod.config, etc. Then your web.config holds your
config info that doesn't change between environments, and you can
easily version your environment specific config files.

The one trick there is that updates to the referenced config files
don't restart the app, so the config changes aren't picked up. You can
manually edit the web.config file or use my stupid "Touch" hack:
http://weblogs.asp.net/jgalloway/arc.../20/76866.aspx

You can roll your own configuration file and reader if you'd like to
have your changes picked up on the fly without restarting the aspnet
wp, but of course it would only be useful for your own custom
appSettings type info.

MSDN info:
http://msdn.microsoft.com/library/de...ngsElement.asp
- Jon
http://weblogs.asp.net/jgalloway

Nov 18 '05 #5

P: n/a
If you are going to change only appsettings, then you can prevent aspnet
process to restart after .config file is changed. There is a option to
reference external config file in appsettings tag. In that custom config
file, you can have your appsettings. If you change that file it wont restart
the application. But this value will be picked when you restart your
application. For more details about this external config file check out this
blog,

http://dotnetjunkies.com/WebLog/sara.../28/30340.aspx

--
Saravana
http://dotnetjunkies.com/WebLog/saravana/
www.ExtremeExperts.com
"Daniel" <bbb> wrote in message
news:Ou**************@TK2MSFTNGP10.phx.gbl...
Hi, is the a way to prevent aspnet process to restart after web.config is
modified?
like, waiting for all sessions to close, or not restart at all ?

Thank you,
Daniel

Nov 18 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.