Modifying the default RDWebAccess web page for fun and profit

Hello all, my name is Jeff Hagler and I work on the Remote Desktop support team.

I routinely hear questions from customers about how to modify the default RDWebAccess website. The modifications include setting default options, automatically inputting server or domain names, or changing the look and feel of the page to match corporate standards. The good news is that at its core the RDWebAccess page is really nothing more than a standard web page being presented by IIS that just happens to tie into Remote Desktop. Because of this, you are free to modify it pretty much any way you like. Just make sure you back-up the page before making any changes, and you are safe to modify the .aspx files directly.

Note: Microsoft does not support the modification of this page, so any changes are at your own risk.

So let’s take a look at the files. When I open IIS manager on one of my RDWebAccess servers and pull up the properties on the default RDWeb site I see this:

image

So we know that C:\Windows\Web\RDWeb\ is the root directory for the site and when I first open my RDWebAccess site I can see that I am viewing:

image

And once I log in I am viewing:

image

Note: the certificate errors are expected since I am accessing the site via the “localhost” name rather than the server’s FQDN and there is no certificate associated with the name “localhost”.

So now that we know the complete path for the files your users are viewing (C:\Windows\Web\RDWeb\Pages\en-US) let’s get to work.

The most common modification that I hear is a request to change the default security option on the login page from public to private in order to preserve the username to make things easier the next time a user logs in. As long as you are aware of the potential security concern from exposing the username, you can easily change this by modifying the page:

1. Browse to C:\Windows\Web\RDWeb\Pages\en-us (or the appropriate location on your system)

2. Give the user you are logged in with full control of login.aspx

3. Make a backup copy of login.aspx

4. Edit the original login.aspx file

5. Find the line:   <label><input id=”rdoPblc” type=”radio” name=”MachineType” value=”public” class=”rdo” onclick=”onClickSecurity()” checked /></label>      And change it to:     <label><input id=”rdoPblc” type=”radio” name=”MachineType” value=”public” class=”rdo” onclick=”onClickSecurity()” /></label>

6. Then find the line:  <label><input id=”rdoPrvt” type=”radio” name=”MachineType” value=”private” class=”rdo” onclick=”onClickSecurity()”/></label>      And change it to:     <label><input id=”rdoPrvt” type=”radio” name=”MachineType” value=”private” class=”rdo” onclick=”onClickSecurity()” checked /></label>

 

Another question commonly asked is how to pre-populate the server name in the “Connect To” field on the “Remote Desktop” page. To do that:

1. Browse to C:\Windows\Web\RDWeb\Pages\en-us (or the appropriate location for your system)

2. Give the user you are logged in with full control of desktops.aspx

3. Make a backup copy of desktops.aspx

4. Edit the original desktops.aspx file

5. Find the following lines:   type=”text” onkeydown=”BLOCKED SCRIPTcheckKey(this);” onkeyup=”BLOCKED SCRIPTcheckLen(this, 1);” />     And change it to:      type=”text” onkeydown=”BLOCKED SCRIPTcheckKey(this);” onkeyup=”BLOCKED SCRIPTcheckLen(this, 1);” value=”ServerNameHere” />

 

While we are in the Desktops.aspx file, you can also change the default resolution by looking just a bit lower in the file for the following section:

</td>
<td width="7"></td>
<td valign="top" style="padding-bottom: 4px;">
&nbsp;<select class="topspace" id="comboResolution" style="width: 270px" name="comboResolution">
<option value="0" selected><%=L_FullScreenLabel_Text %></option>
<option value="1"><%=L_800x600Label_Text %></option>
<option value="2"><%=L_1024x768Label_Text %></option>
<option value="3"><%=L_1280x1024Label_Text %></option>
<option value="4"><%=L_1600x1200Label_Text %></option>
</select>
</td>

…and simply changing which option line gets the “selected” value. Using this pattern you can continue on through the file and set the rest of the default options in the way you like, everything from the default values for redirecting the Printer and Clipboard to the performance profile can be set here.

I hope that this article has provided you with a bit of insight into just how much you can modify the default RDWebAccess site. Now, go have fun, but remember to be safe out there.

Jeff Hagler

Share this post :