DetailPage-MSS-KB

Microsoft small business knowledge base

Article ID: 977507 - Last Review: April 15, 2011 - Revision: 4.0

SYMPTOMS

When you connect to a remote application by using Remote Desktop Web Access (RD Web Access) on a computer that is running Windows Server 2008 R2, the Connected icon does not appear in the notification area.

Note When you first run a remote application, the Connected icon appears in the notification area.

WebSSO (Web Single Sign On) does not work as expected, causing a "double prompt" for credentials in applications launched via RemoteApps published via Remote Desktop Web Access in Windows Server 2008 R2.

CAUSE

This issue occurs when there are multiple unexpired cookies on the client computer.

WORKAROUND

To work around this issue, delete the cookies.

To have us work around the issue for you, go to the "Fix it for me" section. If you prefer to fix this problem yourself, go to the "Let me fix it myself" section.

Fix it for me



To fix this problem automatically, click the Fix it button or link. In the File Download dialog box, click Run and then follow the steps in the Fix it Wizard.


Fix this problem
Microsoft Fix it 50631


Notes
  • This wizard may be in English only. However, the automatic fix also works for other language versions of Windows.
  • If you are not on the computer that has the problem, save the Fix it solution to a flash drive or a CD and then run it on the computer that has the problem.

Then, go to the "Did this fix the problem?" section.



Let me fix it myself

To delete the cookies in Windows Internet Explorer 8, follow these steps:
  1. Click Start, click Control Panel, click Network and Internet Connections, and then click Internet Options.
  2. On the General tab, click Delete.
  3. To delete just the cookies, click to select the Cookies check box, and then click to clear all the other check boxes.
  4. Click Delete.

Another option than deleting the cookies is to change the script file C:\windows\Web\RDWeb\Pages\renderscripts.js on the RD Web Access server.

To change the script file C:\windows\Web\RDWeb\Pages\renderscripts.js, follow these steps:

1. Log in to the Remote Desktop Web Access server as a member in the local Administrators group.
2. Browse to the following jscript file, right-click and select Edit.

C:\windows\Web\RDWeb\Pages\renderscripts.js

3. Find the implement of the following function in that jscript file.
function getCookieContents(strNameOfCookie)

4. Modify the codes in the jscript file to match the following:


Existing code in Renderscripts.js file:

------------------------------------------
function getCookieContents(strNameOfCookie)
{
var objCookie;
var objCookieName;
var objCookieContents = null;

if ( strNameOfCookie != null &&
strNameOfCookie != "" &&
document.cookie.length > 0 )
{
var objCookies = document.cookie.split(";");
for (var iIndex = 0; iIndex < objCookies.length; iIndex++)
{
objCookie = objCookies[iIndex];
objCookieName = objCookie.substring(0, strNameOfCookie.length);



Change the above section in the Renderscripts.js file to match the following:

---------------------------------------------------------------------------------------
// Add a function called trim as a method of the prototype
// object of the String constructor.
String.prototype.trim = function()
{
// Use a regular expression to replace leading and trailing
// spaces with the empty string
return this.replace(/(^\s*)|(\s*$)/g, "");
}
// End of the new-added function

function getCookieContents(strNameOfCookie)
{
var objCookie;
var objCookieName;
var objCookieContents = null;

if ( strNameOfCookie != null &&
strNameOfCookie != "" &&
document.cookie.length > 0 )
{
var objCookies = document.cookie.split(";");
for (var iIndex = 0; iIndex < objCookies.length; iIndex++)
{
objCookie = objCookies[iIndex];
objCookie = objCookie.trim(); //Calling the new-added function
objCookieName = objCookie.substring(0, strNameOfCookie.length);

Did this fix the problem?

  • Check whether the problem is fixed. If the problem is fixed, you are finished with this section. If the problem is not fixed, you can contact support (http://support.microsoft.com/contactus) .
  • We would appreciate your feedback. To provide feedback or to report any issues with this solution, please leave a comment on the "Fix it for me (http://blogs.technet.com/fixit4me/) " blog or send us an email (mailto:fixit4me@microsoft.com?Subject=KB) message.

MORE INFORMATION

This issue may occur when the following conditions are true:
  • Remote Desktop Web Access is in a subdomain that has a parent domain.
  • The parent domain, or any other subdomain, writes a cookie that has the domain set to the parent domain level. This behavior shares the cookie between all subdomains.
If Remote Desktop Web Access is put at the parent domain level, the connection icon appears in the notification area. Additionally, the single sign on (SSO) feature, the remote application, and the Desktop Connection work as expected when you connect to the remote application.


Additionally this can be seen to occur when there is additional cookie information contained in the cookie presented back to the client by the Web server.




APPLIES TO
  • Windows Server 2008 R2 Datacenter
  • Windows Server 2008 R2 Enterprise
  • Windows Server 2008 R2 Standard
Keywords: 
kbtshoot kbexpertisebeginner kbsurveynew kbprb kbfixme kbmsifixme KB977507
Share
Additional support options
Ask The Microsoft Small Business Support Community
Contact Microsoft Small Business Support
Find Microsoft Small Business Support Certified Partner
Find a Microsoft Store For In-Person Small Business Support