Changing Terminal Server port in TSAC ActiveX Web Control

From: Deus, Attonbitus (
Date: 06/13/02

Date: Wed, 12 Jun 2002 21:21:25 -0700
From: "Deus, Attonbitus" <>

Hash: SHA1

Greetings all:

In his latest article on MCP Magazine, Bill Boswell bestowed a titbit of
knowledge that I'm sure many people will be happy to have: You can now
customize the Terminal Server ActiveX control to use an alternate port than
the standard TCP 3389 to connect up to your TS resources.

The MSRDP.OCX ActiveX control that ships with the TSWEB components on SP2
and the Win2K download was hard-coded at 3389- therefore, you could not use
the ActiveX control to connect to servers where the listen port was changed.

.Net and XP now ship with an updated version of MSRDP.OCX that has a new
component (RDPClient). Among the new methods of the control is
"AdvancedSettings2" and one of the properties of "AdvancedSettings2" is

The way the TSWeb access works is by simply loading an ASP page
(CONNECT.ASP) that calls the MSRDP.OCX ActiveX Object. For those of you
that want to use the ActiveX control to connect to a different listening
port, all you have to do is edit the CONNECT.ASP page, and add the
following line before the MsTsc.Connect method:


- - where is X is the custom port your TS is listening on (in decimal). When
the ActiveX control attempts to connect to the TS, it will now use this port.

Replacing your existing Win2k TSWeb components is easy- just go to an XP
box, and under Add/Remove Programs/ Windows Components, install "IIS
(Details) -> WWW Services (Details) -> Remote Desktop Web Connector."

When you install this, it creates a %SystemRoot%\Web\TSWeb directory. Just
copy the contents of this directory to your Win2k TSWeb directory (kill the
existing files first) and you are good to go. Of course, remember to edit
the CONNECT.ASP to point to the new port. When the remote clients go to
the TSWeb site, they will be prompted to install the new ActiveX
control. Those of you using the control in VB / C ++ can directly access
the properties programmatically.

A thread here where we discussed hacking the old control to point to a
custom port drew lots of interest, though I was never successful in making
it work. Now we don't have to worry about it. Hopefully those interested
parties are still on the list and will get this information... Sorry I
could not contact everyone directly.

Thanks to Dr. Tom Shinder for pointing me to the MCP mag article in the
first place.



Version: PGP 7.1


Relevant Pages

  • Re: Remote Desktop Web Connection
    ... > feed you the ActiveX control which you run on your local machine. ... > Jeffrey Randow (Windows Networking MVP) ... >>The router is what is restricting you from reaching multiple machines. ... and it understands rules about passing packets on port ...
  • Re: Unable to set listening port on an activeX control
    ... Is this a pre-existing ActiveX control or one you wrote yourself? ... its listening port to a particular port it does not get set. ...
  • Re: OWA through PIX
    ... If I don't do port ... forwarding everything works like a charm. ... If you are using the MSIE to access Exchange, ... you an ActiveX control which contains and contact the local adresses. ...
  • Enhanced Remote Desktop Web Connection Page
    ... I've been frustrated by the inability to put the port number in on the ... Remote Desktop Web Connection Page that Microsoft puts out, ... following the server address and a colon, ... useful options that the activex control supports, ...
  • ActiveX Control for TSWeb
    ... TSWeb page, however, when a user connects to the page they need to install ... My users do not have admin rights so they cannont ... install the new ActiveX control and I would like to know how can I install ...