How to set default logon domain RD Gateway and/or RD Web
- I'm using Win2k8 R2 servers with WinXP clients. When I logon to the RD Web page, and again to RD Gateway, I -have- to enter domain\username to authenticate. Anyone know how I can set the default logon domain? My users don't even know how to spell their username most of the time, let alone what domain they're in, and I only have one domain.
Thanks
Mark
Answers
Hello Mark,
Based on my understanding on this issue, you want to set a default domain name on the Web Access page for the RemoteApp.
I am afraid that there is no out-of-box way to finish this task from the server side. According to experience, it’s recommended for you to add the default domain name into the Web Access page by customize it.
However, if you want to add default domain name to the Remote Desktop Connections for the RemoteApp resources, you can customize the .rdp-based file with the following line:
username:s:<domain>\Please let me know if it is available for your case and if you need any further assistance on this topic.
Thanks for your understanding and cooperation.
Lionel Chen
TechNet Subscriber Support in forum
If you have any feedback on our support, please contact tngfb@microsoft.com
- Marked As Answer byLionel Chen - MSFTMSFT, ModeratorThursday, September 17, 2009 2:03 AM
Hello Mark,
Thanks for your feedback.
Based on your reply, I understand that you want to add a default domain name into Remote Desktop Web Access page, which helps the clients to know the domain their accounts are in.
You can finish this task by customizing the default login page shipped with Remote Desktop Web Access services role. However, we don’t recommend you to do that in general, because:
· The customization of the system-shipped page may cause unexpected risk or instability.
· The future updates or service packs for related products may overwrite the modified version you customized.
Based on the factors above, if you really need to do this customization, please note to backup both the original version and modified version of the login page, during the following customization steps:
1. Login to the Remote Desktop Web Access role-based server with local administrative permissions.
2. Navigate to the following location:
%windir%\Web\RDWeb\Pages\<The Language of Your Location>\3. Backup the login.aspx file to another location.
4. Right click the login.aspx file, and select Edit. The file will be opened with Edit status in your default HTML editor.
5. Change the original code section:
<input id=”DomainUserName” name=”DomainUserName” type=”text” class=”textInputField” runat=”server” size=”25” autocomplete=”off” />
to be:
<input id=”DomainUserName” name=”DomainUserName” type=”text” class=”textInputField” runat=”server” size=”25” autocomplete=”off” value=”domainname\” />6. Save the modification. Backup the modified version.
Please test the issue again after the steps above. Let us know the result if possible. Thanks for your cooperation again.
Lionel Chen
TechNet Subscriber Support in forum
If you have any feedback on our support, please contact tngfb@microsoft.com
- Marked As Answer byLionel Chen - MSFTMSFT, ModeratorThursday, September 17, 2009 2:03 AM
Hi,
Yes the logging in without the domain thing is weird (RDC v6.1) and dangerous (RDC v7.0) as the latter gives an error clicking on the icon presented in the web access applications list (i.e. "Your computer can't connect to the remote computer because an error occured on the remote computer that you want to connect to.").
The solution we employed was to tweak the underlying web files to better handle the domain. We only have one domain so this was fixed, what I did was edit the renderscripts.js file (which includes the JS procedure which occurs after the login dialog 'submit') to check to see if the user has entered a domain (checking whether a backslash exists) and if not physically edit the edit box contents with the new domain.
In the renderscripts.js file look for the function onLoginFormSubmit(), where it probes the username edit box simply insert the domain. The code extract below includes a peice from the original file which shows you where it should be placed together with the new code (separated by blank lines). In this instance the domain is called CHARLYMONKEY.
if ( objForm != null )
{
strDomainUserName = objForm.elements("DomainUserName").value;// add default domain...
if ( strDomainUserName.indexOf("\\") == -1 )
{
strDomainUserName = "CHARLYMONKEY\\" + strDomainUserName;
objForm.elements("DomainUserName").value = strDomainUserName;
}strPassword = objForm.elements("UserPass").value;
strWorkspaceId = objForm.elements("WorkSpaceID").value;
I hope that is of help, obviously if anything goes wrong with the login the modified version is written back to the edit box (this is essential) so the user can see if somehow they've entered the domain or something but with the wrong kind of slash.
Please note that if you also tweak your main screen to check for RDC 7.0 and if not force users to download and install it the single sign-on works fantastically. I haven't done this yet but am hoping the RDC ActiveX control can be probed by JavaScript so that proper version checking can take place.
kind regards,
Ross- Proposed As Answer byRoss CP Friday, November 13, 2009 3:24 PM
- Marked As Answer byLionel Chen - MSFTMSFT, ModeratorFriday, November 20, 2009 7:46 AM
- Hi,
For those of you that were interested (and those that may get directed here via google or other some such linking) I managed to get a test web page to test the RDC version (which I illuded to in my previous post). This means that you can potentially create an interim page for RDWebAccess to check for the version of the RDC client and push the user towards the download location. As single sign-one works lovely with the new version providing the above default domain tweak is in place this really ties the website up with a bow.
This page creates the ActiveX control, but you HAVE to do this anyway for RDWebAccess to work anyway so they simply enable it for the intro page, and it will not prompt for the main login page.
OK here is the demo web page:
SNIP ----------------------------
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta name="ROBOTS" content="NOINDEX, NOFOLLOW, NOARCHIVE" />
<meta http-equiv="X-UA-Compatible" content="IE=7" />
<script type="text/javascript">
<!--
function versionRdc()
{
try
{
rdpClient = new ActiveXObject("MsRdp.MsRdp.5");
return rdpClient.Version;
}
catch (e)
{
}
return "";
}
function parseVersionString (str)
{
if (typeof(str) != "string") { return false; }
var x = str.split(".");
var maj = parseInt(x[0]) || 0;
var min = parseInt(x[1]) || 0;
var pat = parseInt(x[2]) || 0;
return { major: maj, minor: min, patch: pat }
}
function rdc7()
{
var rdpver = versionRdc();
var rdc7res = true;
if (rdpver != "")
{
var running_version = parseVersionString(rdpver);
var latest_version = parseVersionString("6.1.7600"); // rdc 7.0
if (running_version.major < latest_version.major) { var rdc7res = false; }
else
{
if (running_version.major == latest_version.major)
{
if (running_version.minor < latest_version.minor) { var rdc7res = false; }
else
{
if (running_version.minor == latest_version.minor)
{
if (running_version.patch < latest_version.patch) { var rdc7res = false; }
}
}
}
}
}
return rdc7res;
}
function test()
{
if (rdc7())
{
alert("RDC7 is installed and single sign-on will work.");
}
else
{
alert("RDC7 is not installed.");
}
}
// -->
</script>
</head>
<body onload="test();">
</body>
</html>
SNIP ----------------------------
I hope that is of help.
kind regards,
Ross- Marked As Answer byLionel Chen - MSFTMSFT, ModeratorFriday, November 20, 2009 7:46 AM
All Replies
- Please check this post http://social.technet.microsoft.com/Forums/en-US/winserverTS/thread/5e6c265d-2aa3-4060-bbad-9f7645ea2eac/
Thanks
Vikash Hello Mark,
Based on my understanding on this issue, you want to set a default domain name on the Web Access page for the RemoteApp.
I am afraid that there is no out-of-box way to finish this task from the server side. According to experience, it’s recommended for you to add the default domain name into the Web Access page by customize it.
However, if you want to add default domain name to the Remote Desktop Connections for the RemoteApp resources, you can customize the .rdp-based file with the following line:
username:s:<domain>\Please let me know if it is available for your case and if you need any further assistance on this topic.
Thanks for your understanding and cooperation.
Lionel Chen
TechNet Subscriber Support in forum
If you have any feedback on our support, please contact tngfb@microsoft.com
- Marked As Answer byLionel Chen - MSFTMSFT, ModeratorThursday, September 17, 2009 2:03 AM
- Hi Lionel - is there a way to provide the username:s:<domain>\ option to RemoteApps deployed through RDWeb? I can easily edit .rdp files, but my apps are all deployed through RDWeb.
Thanks
Mark - Hi,
Editing the rdp files is the way, Remote app manager snap-in does not allow you to specify this rdp settings under custom rdp settings.
Regards, Rajesh. Hello Mark,
Thanks for your feedback.
Based on your reply, I understand that you want to add a default domain name into Remote Desktop Web Access page, which helps the clients to know the domain their accounts are in.
You can finish this task by customizing the default login page shipped with Remote Desktop Web Access services role. However, we don’t recommend you to do that in general, because:
· The customization of the system-shipped page may cause unexpected risk or instability.
· The future updates or service packs for related products may overwrite the modified version you customized.
Based on the factors above, if you really need to do this customization, please note to backup both the original version and modified version of the login page, during the following customization steps:
1. Login to the Remote Desktop Web Access role-based server with local administrative permissions.
2. Navigate to the following location:
%windir%\Web\RDWeb\Pages\<The Language of Your Location>\3. Backup the login.aspx file to another location.
4. Right click the login.aspx file, and select Edit. The file will be opened with Edit status in your default HTML editor.
5. Change the original code section:
<input id=”DomainUserName” name=”DomainUserName” type=”text” class=”textInputField” runat=”server” size=”25” autocomplete=”off” />
to be:
<input id=”DomainUserName” name=”DomainUserName” type=”text” class=”textInputField” runat=”server” size=”25” autocomplete=”off” value=”domainname\” />6. Save the modification. Backup the modified version.
Please test the issue again after the steps above. Let us know the result if possible. Thanks for your cooperation again.
Lionel Chen
TechNet Subscriber Support in forum
If you have any feedback on our support, please contact tngfb@microsoft.com
- Marked As Answer byLionel Chen - MSFTMSFT, ModeratorThursday, September 17, 2009 2:03 AM
- Hello Mark,
How are you?
What is the status of the issue now? Please let us know if you need any further help.
Thanks and have a nice day.
Lionel Chen
TechNet Subscriber Support in forum
If you have any feedback on our support, please contact tngfb@microsoft.com
- Hi Mark,
What's going with this issue? I am glad to provide further assistances any time you need.
have a nice day.
Lionel Chen
TechNet Subscriber Support in forum
If you have any feedback on our support, please contact tngfb@microsoft.com
- Lionel,
This issue is not solved. Your solution only covers the initial web acess login page, which oddly enough, can be logged into without the domain name. It seems to work out the domain name itself.
The second logon when opening a remote desktop session after you login the first time from the remoteapp page is the one in question. The gateway login window pops up and users have to enter the domain name there. Modifying the .rdp file with adding username:s:<domain> does not do the trick either as this setting is ignored and if you try to add this setting in the remoteapp custom rdp settings page, the system rejects it and does not allow you to add it. Please check this.
Best Regards,
Amro Hi,
Yes the logging in without the domain thing is weird (RDC v6.1) and dangerous (RDC v7.0) as the latter gives an error clicking on the icon presented in the web access applications list (i.e. "Your computer can't connect to the remote computer because an error occured on the remote computer that you want to connect to.").
The solution we employed was to tweak the underlying web files to better handle the domain. We only have one domain so this was fixed, what I did was edit the renderscripts.js file (which includes the JS procedure which occurs after the login dialog 'submit') to check to see if the user has entered a domain (checking whether a backslash exists) and if not physically edit the edit box contents with the new domain.
In the renderscripts.js file look for the function onLoginFormSubmit(), where it probes the username edit box simply insert the domain. The code extract below includes a peice from the original file which shows you where it should be placed together with the new code (separated by blank lines). In this instance the domain is called CHARLYMONKEY.
if ( objForm != null )
{
strDomainUserName = objForm.elements("DomainUserName").value;// add default domain...
if ( strDomainUserName.indexOf("\\") == -1 )
{
strDomainUserName = "CHARLYMONKEY\\" + strDomainUserName;
objForm.elements("DomainUserName").value = strDomainUserName;
}strPassword = objForm.elements("UserPass").value;
strWorkspaceId = objForm.elements("WorkSpaceID").value;
I hope that is of help, obviously if anything goes wrong with the login the modified version is written back to the edit box (this is essential) so the user can see if somehow they've entered the domain or something but with the wrong kind of slash.
Please note that if you also tweak your main screen to check for RDC 7.0 and if not force users to download and install it the single sign-on works fantastically. I haven't done this yet but am hoping the RDC ActiveX control can be probed by JavaScript so that proper version checking can take place.
kind regards,
Ross- Proposed As Answer byRoss CP Friday, November 13, 2009 3:24 PM
- Marked As Answer byLionel Chen - MSFTMSFT, ModeratorFriday, November 20, 2009 7:46 AM
- Hello Ross,
Thanks a lot for your sharing.
Mark, please consider to give it a try and let us know the result if possible. Thanks.
Lionel Chen
TechNet Subscriber Support in forum
If you have any feedback on our support, please contact tngfb@microsoft.com
- Hi,
For those of you that were interested (and those that may get directed here via google or other some such linking) I managed to get a test web page to test the RDC version (which I illuded to in my previous post). This means that you can potentially create an interim page for RDWebAccess to check for the version of the RDC client and push the user towards the download location. As single sign-one works lovely with the new version providing the above default domain tweak is in place this really ties the website up with a bow.
This page creates the ActiveX control, but you HAVE to do this anyway for RDWebAccess to work anyway so they simply enable it for the intro page, and it will not prompt for the main login page.
OK here is the demo web page:
SNIP ----------------------------
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta name="ROBOTS" content="NOINDEX, NOFOLLOW, NOARCHIVE" />
<meta http-equiv="X-UA-Compatible" content="IE=7" />
<script type="text/javascript">
<!--
function versionRdc()
{
try
{
rdpClient = new ActiveXObject("MsRdp.MsRdp.5");
return rdpClient.Version;
}
catch (e)
{
}
return "";
}
function parseVersionString (str)
{
if (typeof(str) != "string") { return false; }
var x = str.split(".");
var maj = parseInt(x[0]) || 0;
var min = parseInt(x[1]) || 0;
var pat = parseInt(x[2]) || 0;
return { major: maj, minor: min, patch: pat }
}
function rdc7()
{
var rdpver = versionRdc();
var rdc7res = true;
if (rdpver != "")
{
var running_version = parseVersionString(rdpver);
var latest_version = parseVersionString("6.1.7600"); // rdc 7.0
if (running_version.major < latest_version.major) { var rdc7res = false; }
else
{
if (running_version.major == latest_version.major)
{
if (running_version.minor < latest_version.minor) { var rdc7res = false; }
else
{
if (running_version.minor == latest_version.minor)
{
if (running_version.patch < latest_version.patch) { var rdc7res = false; }
}
}
}
}
}
return rdc7res;
}
function test()
{
if (rdc7())
{
alert("RDC7 is installed and single sign-on will work.");
}
else
{
alert("RDC7 is not installed.");
}
}
// -->
</script>
</head>
<body onload="test();">
</body>
</html>
SNIP ----------------------------
I hope that is of help.
kind regards,
Ross- Marked As Answer byLionel Chen - MSFTMSFT, ModeratorFriday, November 20, 2009 7:46 AM

