473,396 Members | 1,590 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Is Configuration.Appsettings Thread safe

We seem to be having a lovely problem while trying to
fetch Keyvalues in the Appsettings section from the
Web.config, our program uses threading ( We fetch each
table in a Dataset of a Separate thread)

It breaks on the line whose code looks quite simple
though
connectionString=ConfigurationSettings.AppSettings
["connectionString"];
BELOW IS THE STACK TRACE

_stackTraceString " at
System.Configuration.ConfigurationRecord.Evaluate( String
configKey)
at
System.Configuration.ConfigurationRecord.ResolveCo nfig
(String configKey)
at System.Configuration.ConfigurationRecord.GetConfig
(String configKey)
at
System.Configuration.DefaultConfigurationSystem.Sy stem.Con
figuration.IConfigurationSystem.GetConfig(String
configKey)
at System.Configuration.ConfigurationSettings.GetConf ig
(String sectionName)
at
System.Configuration.ConfigurationSettings.get_App Settings
()
at System.Configuration.AppSettingsReader..ctor()
at App.DalHelper.Helper.GetConnection(String module)
in c:\my
documents\workouts\revise\dalhelper\datahelper.cs: line
100" string

Nov 15 '05 #1
1 3700
i believe, but not 100 percent sure, that the configurationsettings class is
owned by the main thread so you would possibly need to invoke and not
directly call the method. may be wrong though
"Bijoy" <bi*****************@dewr.gov.au.nospam> wrote in message
news:07****************************@phx.gbl...
We seem to be having a lovely problem while trying to
fetch Keyvalues in the Appsettings section from the
Web.config, our program uses threading ( We fetch each
table in a Dataset of a Separate thread)

It breaks on the line whose code looks quite simple
though
connectionString=ConfigurationSettings.AppSettings
["connectionString"];
BELOW IS THE STACK TRACE

_stackTraceString " at
System.Configuration.ConfigurationRecord.Evaluate( String
configKey)
at
System.Configuration.ConfigurationRecord.ResolveCo nfig
(String configKey)
at System.Configuration.ConfigurationRecord.GetConfig
(String configKey)
at
System.Configuration.DefaultConfigurationSystem.Sy stem.Con
figuration.IConfigurationSystem.GetConfig(String
configKey)
at System.Configuration.ConfigurationSettings.GetConf ig
(String sectionName)
at
System.Configuration.ConfigurationSettings.get_App Settings
()
at System.Configuration.AppSettingsReader..ctor()
at App.DalHelper.Helper.GetConnection(String module)
in c:\my
documents\workouts\revise\dalhelper\datahelper.cs: line
100" string

Nov 15 '05 #2

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

Similar topics

0
by: runningdog | last post by:
HI, Sorry if this is a bit long winded I'm working on a suite of winapps that need to use two levels of configuration data; application level and solution level. I found a reference on MSDN...
2
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>...
1
by: QT | last post by:
Hi. Is it possible to use configuration files with a shared add-in component? I have added one to my solution for the add-in, but I can't pick up the values from my config file. If my...
3
by: Cacho | last post by:
Hi All I'm totally new to vbasic net and need to get values from a config files in the way: <configuration> <appSettings> <add key="Desvio" value="652825616" /> <add key="MargenString"...
7
by: Mike Livenspargar | last post by:
We have an application converted from v1.1 Framework to v2.0. The executable references a class library which in turn has a web reference. The web reference 'URL Behavior' is set to dynamic. We...
2
by: Alan T | last post by:
I have created a class library called Employee.dll and created a configuration file called Convert.config in this project. What should I use to open this config file: <?xml version="1.0"...
2
by: mark4asp | last post by:
In trying to get the C# conversion code for Head First Design Patterns to work I came accross a number of warnings. e.g. Warning Number: 10 Description: ...
2
by: remya1000 | last post by:
i'm using VB.NET 2003. Last time while i did a program in Vb.Net 2005, i use "Configuration". and i could read and write to that XML configuration file like the example below. CODES:...
0
by: =?Utf-8?B?QWxoYW1icmEgRWlkb3MgRGVzYXJyb2xsbw==?= | last post by:
Hi, thanks, mister The code string rutaConfig = tbRutaConfigServicioBase.Text; '// Map to the application configuration file. ExeConfigurationFileMap configFile = New...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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...
0
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...

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.