Client/server applications in a Terminal Services 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 service application) and components that are a client of 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 a Terminal Services 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 which the server component is a service application. For example, if a service calls the MessageBox function, the message box is displayed on the desktop of the terminal server, not on the client desktop. To display a message on a client desktop, the service can call the WtsSendMessage function. Alternatively, the service can request input from the client application, and the client can display the user interface and send the resulting input back to the service.
For more information, see Terminal Services Client/Server Support.
Build date: 5/29/2008