what do you mean by 'unable to read'?
Are you using System.Configuration?
do you have appSetting keys in the config file?
what happens when you try to read those keys?
what is the error?
app.config usually applies to the application, i.e. ArcMap, ArcGISSOC, etc.
At least in versions prior to 10.1, I think that you could find ArcGISSOC.exe and place ArcGISSOC.config in that directory. Essentially you need to find the host executable image and place the config file next to it. I've done this very thing in order to configure log4net when used in conjunction with ArcMap.exe.
I personally do not think that doing this is a good idea. Perhaps you could create your own XML configuration file and literally read it yourself. Just look in whatever directory your assembly is executing out of.
Anand,
Have you got it working finally? I also have similar issue. Is there a way we can use the configuration file to read the parameters instead of setting properties in Contruct?
TIA
Yes, you can write similar code
var appConfig = System.Configuration.ConfigurationManager.OpenExeConfiguration(Assembly.GetExecutingAssembly().Location);
string myValue= appConfig.AppSettings.Settings["myKeyName"].Value;
your app.config
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<appSettings>
<add key="myKeyName" value="testValue"/>
</appSettings>
</configuration>
Thanks for your response Domenico.
Every change in the app.config has to be compiled and the modified .soe file has to be registered once again with ArcGIS server. I am trying to avoid registering the SOE again and again for every configuration change.