Closed huanlin closed 10 years ago
I just reproduced it! If I download the latest source code from GitHub and compile it. There is no problem with this version. That's why I could reproduce it before. This version of Westwind.Utilities.Configuration.dll is 2.20.1.0.
If I use NuGet Manager to add the assembly reference to my projects, the bug shows again. This version of Westwind.Utilities.Configuration.dll is 2.20.0.0.
So I think the version download from NuGet has this bug.
Thanks for the report. I'll update the NuGet package. This bug was fixed a couple of months ago thanks to feed back from another user here.
That's great! Thank you Rick!
Package has been updated. Thanks for your feedback!
I had a very weird situation that whenever I access my web application, it starts and shutdown immediately and normally without any exception. After some tests, I eventually find out that's because
ConfigurationFileConfigurationProvider
is writing to web.config every time in theRead()
method. I can see that from the web.config file's time stamp. But I didn't call anyWrite()
method in my application code.Then I remove Westwind.ApplicationConfiguration assembly from my projects and write my own configuration class. Problem solved. Today I try to reproduce it with a simple program and submit a bug to here, but I couldn't reproduce it!
Now you might be thinking that the problem must lies in my application code. But before I can reproduce it, I would suggest that we do not call
Write()
in aRead()
method because it's implicit and not clear. Or at least provide a Boolean property to explicitly control this manner, such asCreateConfigItemIfNotExist
orAutoCreateConfigItems
. Just a suggestion.Thank you for reading this.