I have created a server application and placed the remoting configuration in
the app.config file. The server application works great.
I'm now trying to create a client application that will actually reside in
the same directory as the server application. I'd like the client
application to determine its port from the server application's exe file.
I've tried using XmlDocument to open and navigate to the channel port, but
LoadXml throws an exception saying "Data at the root level is invalid". I
don't understand though, since the server application reads it fine.
I also tried opening the configuration file using ConfigurationManager, but
it doesn't seem to read any of the sections. There's no error, just no
information. Besides, I wouldn't know how to navigate to the channel port
that way, anyway.
Could someone point me in a useful direction, for getting the port number?
|