PC Review

Thread Tools Rate Thread

How can I read the channel port from app.config?

Jason Barnett
Posts: n/a
      23rd Apr 2009
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?
Reply With Quote

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Dual channel vs. Single Channel =?Utf-8?B?Unlhbg==?= Windows XP Hardware 12 14th Apr 2005 07:08 AM
single channel vs. dual channel Matt Anderson DIY PC 15 7th Jan 2005 08:22 PM
single channel versus dual channel memory setup John Doe DIY PC 5 15th Oct 2004 10:31 AM
Dual Channel RAM and Single Channel RAM Ameer K. Windows XP Hardware 1 21st Jul 2004 07:38 AM
9700 Pro AIW, TV Channel Wizard doesn't allow channel scan Christian Steenberg ATI Video Cards 5 2nd Aug 2003 02:06 AM




All times are GMT +1. The time now is 06:29 AM.