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 / Languages / VB.NET / December 2005

Tip: Looking for answers? Try searching our database.

.NET 2.0 AppSettings Caching Problem

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
rory@grovesinternet.com - 20 Dec 2005 18:59 GMT
Have the following setting in my app.config:

 <setting name="Scenes" serializeAs="Xml">
     <value>
         <ArrayOfString
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
             xmlns:xsd="http://www.w3.org/2001/XMLSchema">
             <string>State
Img;c:\scenes\Scene1\;5000;1;0;0;0;3</string>
             <string>Local
Img;c:\scenes\Scene2\;5000;1;0;0;0;1</string>

<string>Satellite;c:\scenes\Scene3\;5000;4;2000;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???
Ken Tucker [MVP] - 21 Dec 2005 03:34 GMT
Hi,

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

Ken
---------------------
> Have the following setting in my app.config:
>
[quoted text clipped - 34 lines]
> Does anyone have any suggestions for invalidating the cache when
> app.settings changes are made???

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.