Your configuration file must have the name of the exe wich is hosting the
remote objects (not the name of the class library). It should be named
something like:

YourService.exe.config

I think this will work fine.

RQ

-----Original Message-----
From: Moderated discussion of advanced .NET topics.
[mailto:[EMAIL PROTECTED]]On Behalf Of Jeff Hughes
Sent: segunda-feira, 12 de Agosto de 2002 13:06
To: [EMAIL PROTECTED]
Subject: [ADVANCED-DOTNET] Remoting Window Services


I am having a problem remoting using window services. I am trying to remote
a c# assembly dll from a windows service. The problem I am having is it
will not read from the .config file. I am trying to load

<configuration>
    <appSettings>
        <add key="testData" value="connectionString" />
    </appSettings>
</configuration>

this file is named HashDataConnections.dll.config

It is located in my bin\debug directory where the dll resides.

I am trying to read how many keys that are in the file so I can read
them in to a function that will cache the values

It will not read the file. It does not throw any exceptions/errors.
I also tried putting it in the bin/debug folder of the windows service that
is hosting this remote object.
This did not help.

any help would be appriciated. Here is the code of the remote objects
constructor.

Thanks
JJ

 keys = new String[ConfigurationSettings.AppSettings.Keys.Count ];
        keys = ConfigurationSettings.AppSettings.AllKeys;

 string test = ConfigurationSettings.AppSettings["testData"];
//Debug.WriteLine(test);
 for (int i=0; i < keys.Length ; i++)
 {
 CacheConnectionString(ConfigurationSettings.AppSettings[i],keys[i]);
// log.Source = "HashDataConnections";
//      log.WriteEntry(keys[i]);
 }

You can read messages from the Advanced DOTNET archive, unsubscribe from
Advanced DOTNET, or
subscribe to other DevelopMentor lists at http://discuss.develop.com.

You can read messages from the Advanced DOTNET archive, unsubscribe from Advanced 
DOTNET, or
subscribe to other DevelopMentor lists at http://discuss.develop.com.

Reply via email to