Blog du Tristank

So terrific that 3 of 4 readers rated it "soporific"

TSWeb: Sample TSWeb Pages to Connect To Non-standard RDP Ports

If you think you’re experiencing deja vu, it’s because this was also covered in Publishing RDP Servers with TSWeb and ISA 2004 , but I thought I’d do some housekeeping and make a separate post on the pre-fiddled TSWeb connection pages.

Short version:
The TSWeb (aka TSAC, Remote Desktop Web Connection) package includes a sample Default.Htm file that shows you how to use the TSWeb components, but it doesn’t allow the user to specify the port. Not everyone needs to do this – it’s usually only useful if you’re using multiple external ports on the same IP address, or if you change the default RDP connection port for another reason. The samples on this page show you how you can use the scriptable RdpPort property of the TSWeb ActiveX control to connect to another port.

Longer blurb:
The package includes essentially the same default.htm as the – er, default from TSWeb, except there are two zip files within the package, and internally they’re both called External.htm. Plus, I broke the formatting on the horizontal fadey bar, and couldn’t be bothered messing around with it, so it’s been removed. 🙂

The basic difference is that the modified versions can handle a servername and port, instead of just a server name. The ServerList page demonstrates a selectable list of servers:

Selection Box Example

while the ServerTyped version lets the user manually type the name and port of the server using the servername:port format:

ServerTyped, because you type the name!
(this doesn’t work using the regular TSWeb connection page)

They’re both fundamentally based on the same file, and fiddle in the same way with the AdvancedSettings2.RdpPort property to work their magic – just with comments in different places. They’re just an example, all care taken, but no responsibility accepted. There Might Be Bugs*. But they might make your life a teeny bit easier.

Download the package that contains both versions here.

So, open the package that you want to use, then put the external.htm file in the TSWeb directory on the web server. It won’t affect any of the existing files in that folder.

If you’re using the selection list of servers file, you’ll need to find the EDITEDIT bit of the HTML, and replace the example domain names and ports with your own real domain name (or external IP address, but domains are easier to use and less hassle in case of IP address changes) and port, then save the file.

If you’re using the typed version, you pretty much don’t need to edit anything.

Note: If you rename either file, you need to find "external.htm" in the text (it’s next to an EDITEDIT comment), and change it to whatever name you’ve given it.

Then, try browsing to , and try it out – it should all work.