473,473 Members | 1,415 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

IIS6 doesn't recognize changes to config file

I have referenced a separate config file in my application using the
following syntax in web.config:

<galleryServerPro configSource="config\galleryserverpro.config"/>

There are several admin pages that modify one or more settings in this file,
and I need the application to automatically recycle when this happens so that
it loads the new values. Under IIS7 (Vista) this works fine. However, IIS6
does not recycle the app when this file changes.

What is the recommended solution? I can probably add code to "touch" the
web.config file as needed, but this feels like a hack. Is there a better way?

Cheers,
Roger Martin
www.techinfosystems.com / www.galleryserverpro.com

Jul 24 '07 #1
4 3027
To enable the configuration to be recognized on any change to "galleryserverpro.config",
edit machine.config, in the <configSectionssection, and edit <section name="appSettings" ... >,
adding : restartOnExternalChanges="true"
That'd make it :
<section name="appSettings" type="System.Configuration.AppSettingsSection, System.Configuration,
Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" restartOnExternalChanges="true"
requirePermission="false" />

The same for the connectionStrings section.

Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
======================================

"Roger Martin" <Roger Ma****@community.nospamwrote in message
news:D8**********************************@microsof t.com...
>I have referenced a separate config file in my application using the
following syntax in web.config:

<galleryServerPro configSource="config\galleryserverpro.config"/>

There are several admin pages that modify one or more settings in this file,
and I need the application to automatically recycle when this happens so that
it loads the new values. Under IIS7 (Vista) this works fine. However, IIS6
does not recycle the app when this file changes.

What is the recommended solution? I can probably add code to "touch" the
web.config file as needed, but this feels like a hack. Is there a better way?

Cheers,
Roger Martin
www.techinfosystems.com / www.galleryserverpro.com

Jul 24 '07 #2
Thank you for responding. However, this is an application I am distributing
on the internet and many users will be using a hosting provider where they do
not have access to machine.config, so this is not a practical solution.

Is there any way to set this at the application level?
Jul 24 '07 #3
Hi Roger,

It appears that you're using a custom section, right? In that case, I think
you're defining that custom section in your web.config, is that right?
Therefore you should be able to turn on the "restartOnExternalChanges"
option in your web.config.

Here's an example on this:

#Changing Configuration in External File Example
http://msdn2.microsoft.com/en-us/lib...57(vs.80).aspx
Regards,
Walter Wang (wa****@online.microsoft.com, remove 'online.')
Microsoft Online Community Support

==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.

Jul 24 '07 #4
re:
!Is there any way to set this at the application level?

You can define your custom section in web.config,
and distribute your custom web.config to your clients.


Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
======================================
"Roger Martin" <Roger Ma****@community.nospamwrote in message
news:E1**********************************@microsof t.com...
Thank you for responding. However, this is an application I am distributing
on the internet and many users will be using a hosting provider where they do
not have access to machine.config, so this is not a practical solution.

Is there any way to set this at the application level?

Jul 24 '07 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: P. Glassel | last post by:
I'm having problems getting session timeouts to change programmaticlaly under IIS6.0. This is unchanged code that ran as expected under IIS5.0. Anyone else run into this problem? Thx.
16
by: DraguVaso | last post by:
Hi, I have a Windows Service running (made in VB.NET), and wanted to be able to change from time to time some parameters by changing them in the App.config. But it seems that the application...
149
by: Christopher Benson-Manica | last post by:
(Followups set to comp.std.c. Apologies if the crosspost is unwelcome.) strchr() is to strrchr() as strstr() is to strrstr(), but strrstr() isn't part of the standard. Why not? --...
3
by: deja | last post by:
Hi, In IIS6, is there a way to reset an individual web application rather than the whole IIS? Does that happen when you change something in Web.config and save it? Thanks, Chumma Dede
9
by: Tim D | last post by:
Hi, I originally posted this as a reply to a rather old thread in dotnet.framework.general and didn't get any response. I thought it might be more relevant here; anyone got any ideas? My...
0
by: RJ | last post by:
I want to set the location of the log file written by My.Application.Log.WriteEntry MSDN doc has configuration example for changes to app.config file under topic : How to: Write Event Information...
10
by: olafilink | last post by:
Hello, we're running an Win2003server with IIS6 and PHP4 in fastCGI config. When i try to use system() command to execute ffmpeg.exe it works ok when i run the PHP script from the commandline on...
5
by: =?Utf-8?B?bWNxd2VydHk=?= | last post by:
Hello, I'm trying to enable an error handling package at the root of my web server by editing this file: C:\WINDOWS\Microsoft.NET\Framework64\v2.0.50727\CONFIG\web.config In the httpHandlers...
2
by: David Thielen | last post by:
So we have moved our app from .NET version 2.X in IIS6 to a Windows 2008 Server running IIS7. We have copied all files to the Windwardreports\apps directory and that apps directory has been...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.