473,569 Members | 2,752 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

.NET 2.0 AppSettings Caching Problem

Have the following setting in my app.config:

<setting name="Scenes" serializeAs="Xm l">
<value>
<ArrayOfStrin g
xmlns:xsi="http ://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http ://www.w3.org/2001/XMLSchema">
<string>State
Img;c:\scenes\S cene1\;5000;1;0 ;0;0;3</string>
<string>Local
Img;c:\scenes\S cene2\;5000;1;0 ;0;0;1</string>

<string>Satelli te;c:\scenes\Sc ene3\;5000;4;20 00;300;1000;5</string>
</ArrayOfString>
</value>
</setting>

The setting is read into a String array, which is then used in the
processing.

PROBLEM:
--------------------
CHANGING THE VALUES inside <string></string> does not change the
run-time behavior. I usually have to restart VS.2005 or restart my
computer for the changes to be recognized. I have tried both changing
through the Settings tab of the Project Configuration and directly in
the app.config. Other, single-value app setting changes take effect
immediately, it is only this serialized XML array that does not get
picked up.

This problem also affects OTHER MACHINES where the application is
deployed. When I recompile a new EXE and deploy it along with the
exe.config, the setting does not change at run-time. .NET 2.0 is using
a config setting that is SEVERAL DAYS OLD!

My conclusion is that the Framework is caching serialized settings.
Does anyone have any suggestions for invalidating the cache when
app.settings changes are made???

Dec 20 '05 #1
1 3678
Hi,

In the project settings in the settings tab click on the synchronize
button (next to view code)

Ken
---------------------
<ro**@grovesint ernet.com> wrote in message
news:11******** *************@g 47g2000cwa.goog legroups.com...
Have the following setting in my app.config:

<setting name="Scenes" serializeAs="Xm l">
<value>
<ArrayOfStrin g
xmlns:xsi="http ://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http ://www.w3.org/2001/XMLSchema">
<string>State
Img;c:\scenes\S cene1\;5000;1;0 ;0;0;3</string>
<string>Local
Img;c:\scenes\S cene2\;5000;1;0 ;0;0;1</string>

<string>Satelli te;c:\scenes\Sc ene3\;5000;4;20 00;300;1000;5</string>
</ArrayOfString>
</value>
</setting>

The setting is read into a String array, which is then used in the
processing.

PROBLEM:
--------------------
CHANGING THE VALUES inside <string></string> does not change the
run-time behavior. I usually have to restart VS.2005 or restart my
computer for the changes to be recognized. I have tried both changing
through the Settings tab of the Project Configuration and directly in
the app.config. Other, single-value app setting changes take effect
immediately, it is only this serialized XML array that does not get
picked up.

This problem also affects OTHER MACHINES where the application is
deployed. When I recompile a new EXE and deploy it along with the
exe.config, the setting does not change at run-time. .NET 2.0 is using
a config setting that is SEVERAL DAYS OLD!

My conclusion is that the Framework is caching serialized settings.
Does anyone have any suggestions for invalidating the cache when
app.settings changes are made???

Dec 21 '05 #2

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

Similar topics

4
3012
by: Keith Chadwick | last post by:
I have 3 individual ASP.NET applications that make up the overall web application. Each of these websites share some common styles, scripts and xslt files. These are all placed in a single directory structure then in IIS each .NET application has the virtual directory called shared created. The problem is that and server side uri paths do...
2
15464
by: hazz | last post by:
I have spent more time than I care to admit trying to track down a very subtle error. Here is my app's xx.exe.config file. <?xml version="1.0" encoding="utf-8" ?> <configuration> <appsettings> <add key="PasswordProvider" value="fudge" /> </appsettings>
3
9072
by: jason | last post by:
i am coding a simple console application with Visual C# .NET in Visual Studio .NET my config file (myapp.exe.config) has the following appSettings section: <appSettings> <add key="myKey" value="myValue" /> </appSettings>
3
1627
by: Janaka | last post by:
Hi All, I'm having a problem with Page Output caching on a page that contains a DataGrid. Basically the page pulls up some data for sales information from the DB. Some of this has to be calculated on the fly when the request is made, and so I thought it would be ideal to cache the page for a set amount of time. I've placed the following...
2
5015
by: Jared Hagel | last post by:
I've searched the web for a solution to this problem. Surprisingly, no problem/solution has been posted yet. We can read application configuration information fine when our asp.net application runs on a Windows 2000 server. But when we run this same application from Windows 2003, we can't read any application configuration. The code in...
17
3234
by: Fred Nelson | last post by:
Hi: I have written several web applications that obtain their connection strings from the web.config file. This is very easy to use and it makes it easy to move an app from development into production. I'm in the process of writing a site that will have lots of traffic so I'm trying to save resources everyplace that I can. My question...
5
12513
by: Simon Hart | last post by:
Hi, I want to use the ConfigurationSettings.AppSettings from within a .NET class library that gets called. If using the above class, what would the name of the config file be? would this be the name of the DLL that is calling it as per a Windows EXE ie : myexe.exe.config. I have named my Xml file mydll.dll.config where mydll is the name of...
4
2972
by: Hermann | last post by:
My site is a bit slow showing the main page so I thought caching query result in PHP will improve performace. Then I read MySQL documentation and saw that MySQL does have a caching feature. So... now I dont know if doing the PHP caching is worth the pain. Would there be any noticed performace improvement if I cache query results in PHP,...
7
11100
by: moondaddy | last post by:
I'm running a wpf windows app and want to add the appSettings element to the config file. when I do, the app wont start up and I get the following error: {"The type initializer for 'System.Windows.Application' threw an exception."} {"The type initializer for 'System.Windows.Navigation.BaseUriHelper' threw an exception."} " at...
0
7609
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7921
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
7964
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6278
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5504
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3651
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3636
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2107
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 we have to send another system
0
936
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.