Showing posts with label RD Web Access. Show all posts
Showing posts with label RD Web Access. Show all posts

Wednesday, March 13, 2013

KB: Generic error message when you change your password on a RD Web Access website in Windows Server 2012 or in Windows Server 2008 R2 (2793072)

A new KB has been released (2793072) regarding the generic error message you receive when using the change password option in RD Web Access.

“…Assume that you install the Remote Desktop (RD) Web Access role service on a computer that is running Windows Server 2012 or Windows Server 2008 R2. You try to change an expired password on the RD Web Access website by using a new password that does not meet the length, complexity, or history requirements. In this situation, you receive a generic error message that resembles the following:  

Your password cannot be changed. Please contact your administrator for assistance…”

“…This issue occurs because Windows does not retrieve the extended error code from the native Lightweight Directory Access Protocol (LDAP) API. Instead, Windows tries to map a generic error code and returns an error message based on the generic code…”

Source and download: http://support.microsoft.com/kb/2793072/en-us?sd=rss&spid=14134

Thursday, November 29, 2012

Password change option also available in RD Web Access on Windows Server 2008 R2

A while back I posted about one of the new features on RD Web Access in Windows Server 2012: an option to change your password by using RD Web Access.
http://microsoftplatform.blogspot.nl/2012/03/rds-in-win8-feature-highlight-no_12.html

It seems that this option can also be made available on RD Web Access based on Windows Server 2008 R2.The option is not there by default but can be enabled by running a patch on your RD Web Access server.

Remember that the password change feature can be accessed by opening the password.aspx page, so for example https://<ServerName>/RDWeb/Pages/en-US/password.aspx. On a RD Web Access server running Windows Server 2008 R2 this file is not there be default.

image

The patch that creates the necessary files is:
http://support.microsoft.com/kb/2648402

Note that the KB Article does not really mention the fact that the password change option is also added. It’s actually related to fix a different, although somewhat related, issue.

The KB Article does however mention the passwords.aspx file.

image

After installing the patch (and a reboot that is required) the password.aspx file is created.

image

To enable the option we need to set a variable in IIS (the same as with RD Web Access Windows Server 2012).

image

After that, we’re able to browse to the password.aspx file and successfully change a password.

image

image

Thanks goes out to Alexey Astashin for pointing this out to me and updating the TechNet Wiki.http://social.technet.microsoft.com/wiki/contents/articles/10755.enabling-the-rd-webaccess-expired-password-reset-option-in-windows-server-2012.aspx

Friday, November 9, 2012

Customize RD Web Access, a drop down server list

As you might know, RD Web Access provides two different ways to allow users to connect. The tab “RemoteApp and Desktops” tab contains the Remote Apps and Desktops that are authorized to user. The tab “Connect to a remote PC” allows users to specify the destination remote client, server of farm by providing the DNS or hostname.
image
In some cases you might want to pre-define the hostname users have to enter. In this blog post I’ll guide you through the process of configuring a drop down list containing destinations we want users to be able to select.
STEP 1. We’ll be editing the desktops.aspx which is located in C:\Windows\Web\RDWeb\Pages\en-US\Desktops.aspx (may differ based on the language of the Server OS). Be sure to create a backup of that file first.
STEP 2. Locate the definition of the function function GetParam(sParam, bReqd, vDefault) and add the following function specified below that function definition. We’ll use this function to retrieve selected value of the dropdown box. We can’t use the existing GetParams function as this returns the number of the select item in de dropdown box. (Uses by for example the Remote desktop size dropdown box).
function GetDestination(sParam, bReqd, vDefault)
{
    var obj = document.getElementById(sParam);
    if(obj != null)
    {
        switch(obj.tagName)
        {
            case "SELECT":
                return obj.options[obj.selectedIndex].value;
                break;
            default:
                break;
        }
    }
    else
    {
        if ((bReqd) && ((vDefault == "") || (vDefault == null) || (obj == null)))
        {
            var L_ErrMsgInvalid_Text = "%ParameterName% is not a valid or available parameter name.";  // {Placeholder="%ParameterName%"}
            var errMsgInvalid = sParam;
            errMsgInvalid = errMsgInvalid.replace("%ParameterName%", sParam);
            var retval = TSMsgBox(errMsgInvalid, vbInformation, L_sTitle_Text);
            return null;
        }
        else
        {
            return vDefault;
        }
    }
}
STEP 3. Replace the following code <input name="MachineName" maxlength="255" id="MachineName" class="textInputField" type="text"
                                    onfocus="updateConnectButtonState(this);" onblur="updateConnectButtonState(this);"
                                    onkeyup="onConnectToKeyUp(this);" onpropertychange="onConnectToPropertyChange(this);"/>
With the code: <select id="MachineName" style="width: 270px" name="MachineName">
                                        <option value="rds01.lab.local" selected="selected">rds01.lab.local</option>
                                        <option value="rds02.lab.local">rds02.lab.local</option>
                                        <option value="rds03.lab.local">rds03.lab.local</option>
                                    </select>

STEP 4. To make sure the connect button is always available find the following string and remove the part disabled="disabled"<button type="button" id="ButtonConnect" name="ButtonConnect" disabled="disabled"
STEP 5. Replace the following piece of code
var RDPstr = "full address:s:" + GetParam("MachineName", true, "") + "\n";
With the code:
var RDPstr = "full address:s:" + GetDestination("MachineName", true, "") + "\n";
STEP 6. The end result should look like something below:

Upon clicking Connect a RDP session to the selected destination is launched.
image