Searching for remoted service

  • Thread starter Thread starter Ken Allen
  • Start date Start date
K

Ken Allen

I am experimenting with a new facility that will replace an existing
client/server environment that uses named pipes for communication.

The client application uses SHBrowseForFolder standard Windows dialog to
generate a list of all domains and all servers within those domains, thus
permitting the client to select a server to which to attempt a connection.
The client attempts to connect to a specific named pipe on that server and
reports any errors. The named pipe in this case is managed by a Windows
Server (C++ 6) that permits multiple connections from a large number of
potential clients, and there may be a significant number of systems actually
running this service (and any client may connect to one or more of these
systems).

The new service is to be written in C# and will use remoting to permit the
client to make requests from one or more servers.

1. In C#, how can I get a list of all of the domains and servers? I do no
see any reference to the above named standard dialog in the list of system
dialogs supported from .Net, nor can I find any way to enumerate the domains
and servers within those domains.

2. What is the simplest method for determining whether a specific server is
executing a copy of my .Net service? I can try to connect, but that may
involve a timeout value that is too long -- ideally I would like to present
the user with a list of domain\server names that support my service, rather
than a complete list of servers and then fail the connection because the
service is not available on that system.

Note that this is not a web application, and I am not certain that WSDL is
appropriate here at all. And even if it is, In my quick reading of it I
became completely overwhelmed with respect to how I might configure and use
it!

-Ken
 
Hi Ken,

Ken said:
I am experimenting with a new facility that will replace an existing
client/server environment that uses named pipes for communication.

The client application uses SHBrowseForFolder standard Windows dialog to
generate a list of all domains and all servers within those domains, thus
permitting the client to select a server to which to attempt a connection.
The client attempts to connect to a specific named pipe on that server and
reports any errors. The named pipe in this case is managed by a Windows
Server (C++ 6) that permits multiple connections from a large number of
potential clients, and there may be a significant number of systems
actually running this service (and any client may connect to one or more
of these systems).

The new service is to be written in C# and will use remoting to permit the
client to make requests from one or more servers.

1. In C#, how can I get a list of all of the domains and servers? I do no
see any reference to the above named standard dialog in the list of system
dialogs supported from .Net, nor can I find any way to enumerate the
domains and servers within those domains.

There are no standard classes. You have to use P/Invoke to standard windows
functions to get the list.
2. What is the simplest method for determining whether a specific server
is executing a copy of my .Net service? I can try to connect, but that may
involve a timeout value that is too long -- ideally I would like to
present the user with a list of domain\server names that support my
service, rather than a complete list of servers and then fail the
connection because the service is not available on that system.

No quick way to test for a service. Remoting call is made upon the first
method invocation. And unfortunately you do not have control build-in
control over tcp channel timeout, only over http channels. Of course there
is workaround.

So better way is: prepare a list of possible server, and use a factory
method for testing if the server is available or can serve the request.

For proper timing out of tcp channel, you can invoke the first method call
with a async delegate, and use the ar.WaitOne(...) to time the waiting.



Hope that helps
Sunny

P.S. the framework.remoting is more appropriate group.
 
Back
Top