Remote Desktop Web Connection

Remote Desktop Web Connection

To offer embedded RDP sessions in Web pages with Microsoft Windows 2000, Service Pack 1 added the Windows Terminal Advanced Client (TSAC). The TSAC was a special RDP client that supported RDP version 5.0 and extended the terminal server technology to include the Web. To connect to a terminal server, clients merely needed to have Internet Explorer, a connection to an internal or external network, and authorization to use an ActiveX control.

Windows XP then included TSAC’s successor, Remote Desktop Web Connection for RDP 5.1. Microsoft Windows Server 2003 comes with an updated version of this tool, but it must be specially installed. Although both versions of Remote Desktop Web Connection for Windows XP and Windows Server 2003 support the latest RDP functions, they are, of course, also backward compatible with RDP 5.0.


If Windows Server 2003 is playing the role of a Web application server (using Active Server Pages or ASP.NET), Internet Information Services (IIS) 6.0 is already installed. IIS is required to install Remote Desktop Web Connection. If IIS is not already installed, it can be added at any time using the server configuration wizard.

Unfortunately, it is not very easy to find the location for installing Remote Desktop Web Connection under Windows Server 2003. It is located in the software installation dialog window. To launch it, go to Start\Control Panel\Add or Remove Programs\Add/Remove Windows Components. Navigate from Application Server to Internet Information Services (IIS) and World Wide Web Service, and finally to Remote Desktop Web Connection. Click the Details button to move from one level of the component hierarchy to the next.

Remote Desktop Web Connection can be successfully installed under Windows Server 2003 after IIS has been installed with default settings. If need be, the current configuration of Internet Information Services can be changed at any time using Internet Information Services Manager under Start\Administrative Tools\Internet Information Services (IIS) Manager.

Click To expand
Figure 12-2: Hierarchy of dialog windows for installing Remote Desktop Web Connection.

The Remote Desktop Web Connection versions are different for Windows XP and Windows Server 2003, although both can be installed with Windows Server 2003. The requirement for both versions is, of course, the prior installation of Internet Information Services. After installation, the Remote Desktop Web Connection files for Windows XP, as downloaded from the Microsoft Web site, are located at Inetpub \wwwroot\TSWeb. Installation via the Windows components of Windows Server 2003 includes more up-to-date versions of the files and is performed in the %Systemroot%\Web\TSWeb folder.

Click To expand
Figure 12-3: Internet Information Services Manager after installing Internet Information Services and Remote Desktop Web Connection.

Technical Mode of Operation

From a technological standpoint, Remote Desktop Web Connection is a Web application consisting of an ActiveX control and a connection page that serves as a sample page. If Remote Desktop Web Connection is distributed via a Web server, the client connection to a terminal server can take place through Internet Explorer and a TCP/IP connection.

Click To expand
Figure 12-4: Log in using Remote Desktop Web Connection. Installing the signed ActiveX control element usually generates a security warning.

What components are needed to execute Remote Desktop Web Connection?

  • A server platform running Windows Server 2003 and version 6 of the Internet Information Services.

  • A client that can load and execute the ActiveX control element. This can be any client that has Microsoft Windows NT 4.0, Service Pack 4 or higher, and Internet Explorer version 4.01 or higher. Active scripting as well as loading and executing signed ActiveX control elements must be enabled in the relevant Internet Explorer security zone.

The Remote Desktop Web Connection sample page uses the Msrdp.cap installation file to supply the Msrdp.ocx RDP client. Depending on the configuration of the terminal server, this RDP client uses an RC4 encryption algorithm by RSA security, with a key length of 40, 56, or 128 bits. Like other RDP clients, this client uses TCP port 3389 for communication, which is an important restriction of usage across firewall boundaries.

Click To expand
Figure 12-5: Executing an embedded user session in Internet Explorer.

Adapting the Sample Page

The logic of the sample page shows how the RDP ActiveX control is incorporated. This can, of course, also be used for other Web sites.

Listing 12-1: Incorporating the ActiveX Control and Transferring the Parameters for the Width and Height of the Terminal Services Session
Start example
<OBJECT language="vbscript" ID="MsRdpClient"
WIDTH=<% resWidth = Request.QueryString("rW")
    if  resWidth < 200 or resWidth > 1600 then
        resWidth = 800
    end if
    Response.Write resWidth %>
HEIGHT=<% resHeight = Request.QueryString("rH")
    if  resHeight < 200 or resHeight > 1200 then
       resHeight = 600
    end if
    Response.Write resHeight %>>
End example

Listing 12-1 shows how basic parameters are incorporated. The value for WIDTH is the width in pixels used to show the Terminal Services session in the Web site. A similar statement applies to the value HEIGHT and the height of the Terminal Services session. The CODEBASE value is the location where the file containing the Remote Desktop Web Connection code is stored. The name of this file is It is located in the folder in which the ActiveX control element and the sample pages for Remote Desktop are installed. PARAMNAME is defined in at least one of the parameters supported in Msrdp.ocx.

The Remote Desktop ActiveX control element has a number of object parameters and methods with which it can be controlled. As an additional example, Listing 12-2 lists the preparatory commands for opening and also lists when the user session is to be started using the Connect method.

Listing 12-2: Invoking an Application That Is Launched Within a New User Session
Start example
if MsRdpClient.SecuredSettingsEnabled then
    MsRdpClient.SecuredSettings.StartProgram = "notepad.exe"
    msgbox "Cannot access secured setting (startprogram) in the current browser zone"
end if
End example

Additional object parameters for the Msrdp.ocx ActiveX control element of Remote Desktop Web Connection can be viewed with a program such as Oleview.exe or with the Microsoft Visual Basic Object Browser.

The Remote Desktop Web Connection sample page shows only the basic possibilities of this technology. Additional object parameters of the ActiveX control and, above all, the possibilities for coding associated Web applications with ASP.NET make it possible to develop much more powerful start pages for Remote Desktop access.

Just providing rather simple Web pages to access centralized Windows-based applications is not suitable for most enterprise environments in which additional features are required. This is why the next chapter will introduce the concept of application access portals.