Forcing the Remote Desktop option in TS Web Access to use TS Gateway
Published Mar 15 2019 07:25 PM 465 Views
Microsoft
First published on TECHNET on Aug 19, 2008

Hi, my name is Mark Ghazai and I am a Support Escalation Engineer on the Performance team.  Today, we’re going to discuss how to modify the Remote Desktop option on the Windows Server 2008 TS Web Access page.  This has been a fairly common question over the last few months.  In particular, many of our customers have asked how they can force connections through the TS Gateway.  Contrary to popular belief, making this configuration change is not as difficult as you might have thought …

Here’s the screen shot of Remote Desktop Option under TS Web Access page – if you’ve been using Windows Server 2008 TS Web Access, you are already familiar with this page:

In the TechNet article listed at the end of this post, there are instructions on how to specify the TSGateway for this Remote Desktop Connection (see the screen shot below):

Observing the TS Web Access behavior, you can see that IIS ASP application automatically detects if the user is on the local or external network.  If the user is on the local network, the web application will bypass the TSGateway by default.  But, what if you want to route all Remote Desktop connections using this option through your TSGateway server regardless of location?  With a fairly simple page modification, this can be done;

  1. In the Internet Information Services (IIS) Manager Console, navigate to the TS folder under the Default Web Site.  This is the default path, you’ll need to navigate to the custom path if you’ve customized the TS Web Access site settings.
  2. Right Click on the TS and select Explore option.
  3. Windows Explorer should open that Web page folder associated with TS Web Access website.
  4. Navigate to the \Web\TS\en-US
  5. Edit the Desktops.aspx file using a text editor such as Notepad.

  6. Modify the following section in the Desktops.aspx file and Save it.  NOTE: I would highly recommend making a backup of this file … just in case!

  7. This change will take effect as soon as you restart the web site in the IIS Manager Console.  Making this change will force the Remote Desktop to be routed through TSGateway server (by default port 443) on all clients regardless of their location.

And that brings us to the end of our post.  Hopefully this helps answer some of your questions in this regard.  Until next time …

Additional Resources:

- Mark Ghazai

Share this post :
Version history
Last update:
‎Mar 15 2019 07:25 PM
Updated by: