Client/Server Applications

[This is preliminary documentation and subject to change.]

Client/server applications in a Windows®-based Terminal Server environment must be able to handle multiple clients connecting from the same computer. If your application is composed of a server component (such as a Windows NT service) and client components that connect to the server component, make sure that the server component can differentiate between multiple clients residing on the same system. To accomplish this, clients should establish communication with the server component through a well-defined global interface (for example, RPC or named pipes). The server and client should negotiate a different communication channel for each user session.

This same client/server consideration applies to client applications running in the Terminal Server environment that must establish connections to server components over the network. In this case, the client/server connection should use protocols that easily support this type of operation, such as TCP/IP where a different socket connection can be used for each client application. Applications should not assume that a single system connection is equivalent to a single user session.

Prompts for user input are another potential source of problems for client/server applications in a Terminal Server environment. If the server component is a Windows NT service, the server component should not display a user interface to request input from the client. Any user interface displayed by a Windows NT service displays on the Terminal Server desktop, not on the client desktop. If a service prompts for input, the client application will appear to stop responding until the input is provided at the server console. Instead, the service should request input from the client application, and the client should display the user interface and send the resulting input back to the server.