Hi,
This is good question to ask in the
microsoft.publi c.dotnet.framew ork.remoting newsgroup. Still, I can suggest
the following: don't use configuration files and configure the remoting
subsystem programmaticall y. Thus you can store the port number somewhere in
the registry and configure the TCP channel using that number for both the
client and the server.
P.S. Hope you don't need to re-configure the client "on the fly". As
Windows, unlike Unix systems, is missing signals, this would require using
either cross-process messaging, or a named pipe, or a named synchronization
object.
--
Dmitriy Lapshin [C# / .NET MVP]
X-Unity Test Studio
http://x-unity.miik.com.ua/teststudio.aspx
Bring the power of unit testing to VS .NET IDE
"wobbles" <no************ *************** @killspam.hotma il.com> wrote in
message news:bo******** *************** *********@4ax.c om...
Hi Everyone,
I have a server which reads information from a "server.exe.con fig"
file and a client that also reads from its "client.exe.con fig" file.
If the server location or the port number changes I'd like to write
(using streamwriter) a new config file for the client app.
So I have a few questions:
1. Is "writing" my own config file (for the client) a bad approach. If
so, why? What's a better approach?
2. How can I find out which port number my service is using? I'd like
my server-app to know this so that it can write the appropriate config
file for the client.
I've been googling (on q.2) for a while now but found nothing useful.
Thanks!
wobbles