diff --git a/RDSFactorWeb/RDWeb/Pages/App_Data/ASPNETDB.MDF b/RDSFactorWeb/RDWeb/Pages/App_Data/ASPNETDB.MDF new file mode 100644 index 0000000..e308853 Binary files /dev/null and b/RDSFactorWeb/RDWeb/Pages/App_Data/ASPNETDB.MDF differ diff --git a/RDSFactorWeb/RDWeb/Pages/App_Data/allusers_tswa.log b/RDSFactorWeb/RDWeb/Pages/App_Data/allusers_tswa.log new file mode 100644 index 0000000..9ee7d9a Binary files /dev/null and b/RDSFactorWeb/RDWeb/Pages/App_Data/allusers_tswa.log differ diff --git a/RDSFactorWeb/RDWeb/Pages/App_Data/aspnetdb_log.ldf b/RDSFactorWeb/RDWeb/Pages/App_Data/aspnetdb_log.ldf new file mode 100644 index 0000000..49e2dff Binary files /dev/null and b/RDSFactorWeb/RDWeb/Pages/App_Data/aspnetdb_log.ldf differ diff --git a/RDSFactorWeb/RDWeb/Pages/Bin/en/TSPortalWebPart.resources.dll b/RDSFactorWeb/RDWeb/Pages/Bin/en/TSPortalWebPart.resources.dll new file mode 100644 index 0000000..cd8ca43 Binary files /dev/null and b/RDSFactorWeb/RDWeb/Pages/Bin/en/TSPortalWebPart.resources.dll differ diff --git a/RDSFactorWeb/RDWeb/Pages/Bin/tsportalwebpart.dll b/RDSFactorWeb/RDWeb/Pages/Bin/tsportalwebpart.dll new file mode 100644 index 0000000..5d914e7 Binary files /dev/null and b/RDSFactorWeb/RDWeb/Pages/Bin/tsportalwebpart.dll differ diff --git a/RDSFactorWeb/RDWeb/Pages/Default.aspx b/RDSFactorWeb/RDWeb/Pages/Default.aspx new file mode 100644 index 0000000..7ca79cf --- /dev/null +++ b/RDSFactorWeb/RDWeb/Pages/Default.aspx @@ -0,0 +1,137 @@ +<%@ Page Language="C#" %> + + + + + + + + diff --git a/RDSFactorWeb/RDWeb/Pages/Default.aspx.cs b/RDSFactorWeb/RDWeb/Pages/Default.aspx.cs new file mode 100644 index 0000000..8d9e2eb --- /dev/null +++ b/RDSFactorWeb/RDWeb/Pages/Default.aspx.cs @@ -0,0 +1,20 @@ +// +// Copyright (C) Microsoft. All rights reserved. +// +using System; +using System.Data; +using System.Configuration; +using System.Web; +using System.Web.Security; +using System.Web.UI; +using System.Web.UI.WebControls; +using System.Web.UI.WebControls.WebParts; +using System.Web.UI.HtmlControls; + +public partial class _Default : System.Web.UI.Page +{ + protected void Page_Load(object sender, EventArgs e) + { + + } +} \ No newline at end of file diff --git a/RDSFactorWeb/RDWeb/Pages/RenderFail.css b/RDSFactorWeb/RDWeb/Pages/RenderFail.css new file mode 100644 index 0000000..68d0a95 --- /dev/null +++ b/RDSFactorWeb/RDWeb/Pages/RenderFail.css @@ -0,0 +1,6 @@ +/* + These rules should only take effect when some failure + has occurred to prevent normal XSLT processing +*/ +RDWAPage > * {display:none} +RenderFailureMessage {display:block} \ No newline at end of file diff --git a/RDSFactorWeb/RDWeb/Pages/Site.xsl b/RDSFactorWeb/RDWeb/Pages/Site.xsl new file mode 100644 index 0000000..08e7a47 --- /dev/null +++ b/RDSFactorWeb/RDWeb/Pages/Site.xsl @@ -0,0 +1,771 @@ + + + + + + + + + + + + + + + + + + + + + <xsl:value-of select="$strings[@id = 'PageTitle']"/> + + + + + + + + + + + + + + + + Page Table + + + 1st Row (Empty) + + + + + 2nd Row (Top Border Images) + + + + + 3rd Row (Main) + + + + + 4th Row (Bottom Border Images) + + + + + + 5th Row (Empty) + + + +
+ + + + + + +
+
+ + Contents and Controls Table (1 Row, 3 Columns) + + + + Col 1 - Left Border Images + + + Col 2 - Contents and Controls + + Col 3 - Right Border Images + + + +
  + + Inner Contents and Controls Table (8 Rows, 1 Column) + + + 1st Row - RD Web Access Logo + + + + + Row - Empty + + + + + 3rd Row - Customizable Banner and Text Row + + + + + 4th Row - Navigation Table + + + + + + + + + + + + 5th Row - Image + + + + + 6th Row - Empty + + + + + 7th Row - Visible Controls + + + + + + + 8th Row - Footer + + + + +
+ + + + + + + +
+ +   + +  
+
+ + + + + Replaceable Company Logo Image + + + + Replaceable Company Logo Text and Application Type + + + +
  + +   + + + + + + + +
+ +
+
+
+ Login Page only contains Help link + + + + + +
+ + + +  
+
+ +
+ + + + + +
+
+ +
+
+
+
+
+ + + Windows Server Logo + + Microsoft Logo + + +
+ + + + + +
  + +
+
+
+
 
+
+ + + + + + +
+
+ + +
+ + + + + []> + <style> + + </style> + <![endif] + + + + + + + + + + + + +
+ + + +
+
+ + + + + + + + + + + +
+ + + + + + +
 
+ +
+ + + + + + + + + + + + +
+ + + +  |  + + + +  
+ +
+ + + +
+ + + +   + | +   + + + + + + + + + + + + + + + + + + + + + + + + + + + AppFeed_ +
+ oDivMsRdpClient + + +
+ +
+ content + + + + + + + + + + + + + + + +
+ + +
+ + +
+ + + goRDP(this, '', ''); + goNonRDP(this, ''); + + + +
+ + + + + + +
+ +
+
+
+
+ + + +
+ window.location.href='Default.aspx/' + encodeURIComponent('') + + + +
+ + +
+ +
+
+
+
+ +
diff --git a/RDSFactorWeb/RDWeb/Pages/Web.config b/RDSFactorWeb/RDWeb/Pages/Web.config new file mode 100644 index 0000000..1270db6 --- /dev/null +++ b/RDSFactorWeb/RDWeb/Pages/Web.config @@ -0,0 +1,125 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/RDSFactorWeb/RDWeb/Pages/WebFeed.aspx b/RDSFactorWeb/RDWeb/Pages/WebFeed.aspx new file mode 100644 index 0000000..6e60608 --- /dev/null +++ b/RDSFactorWeb/RDWeb/Pages/WebFeed.aspx @@ -0,0 +1,2 @@ +<%@ Page Language="C#" CodeFile="WebFeed.aspx.cs" Inherits="TSWF_PagesVdir.TsWebFeed" Trace="false" %> +<%=oXML%> diff --git a/RDSFactorWeb/RDWeb/Pages/WebFeed.aspx.cs b/RDSFactorWeb/RDWeb/Pages/WebFeed.aspx.cs new file mode 100644 index 0000000..c6ef8d7 --- /dev/null +++ b/RDSFactorWeb/RDWeb/Pages/WebFeed.aspx.cs @@ -0,0 +1,99 @@ +// +// Copyright (C) Microsoft. All rights reserved. +// +using Microsoft.TerminalServices.Publishing.Portal; +using System; +using System.Configuration; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.IO; +using System.Text; +using System.Web; +using System.Web.UI; +using System.Web.Security; +using System.Web.Configuration; +using System.Xml; +using Microsoft.TerminalServices.Publishing.Portal.FormAuthentication; + +namespace TSWF_PagesVdir +{ + public partial class TsWebFeed : System.Web.UI.Page + { + public string oXML; + + protected void Page_Init(object sender, EventArgs e) + { + AuthenticationMode eAuthenticationMode = AuthenticationMode.None; + string strUserIdentity = ""; + + AuthenticationSection objAuthenticationSection = ConfigurationManager.GetSection("system.web/authentication") as AuthenticationSection; + if ( objAuthenticationSection != null ) + { + eAuthenticationMode = objAuthenticationSection.Mode; + } + + if ( eAuthenticationMode == AuthenticationMode.Forms ) + { + if ( HttpContext.Current.User.Identity.IsAuthenticated == false ) + { + Uri baseUrl = new Uri(PageContentsHelper.GetBaseUri(Context), Request.FilePath + "/.."); + string queryString = PageContentsHelper.AppendTenantIdToQuery("?ReturnUrl=../WebFeed.aspx"); + Response.Redirect(baseUrl.ToString() + "default.aspx" + queryString); + } + + TSFormAuthTicketInfo objTSFormAuthTicketInfo = new TSFormAuthTicketInfo(HttpContext.Current); + strUserIdentity = objTSFormAuthTicketInfo.UserIdentity; + // + // TODO: Need to correctly call this + // + //Response.Write("\nshowWorkspaceNotification();"); + } + + HttpContext.Current.Response.AppendHeader("Vary", "Accept"); + + FeedXmlVersion xmlVersion; + string contentType; + ContentNegotiationHelper.GetPreferredXmlVersion(out xmlVersion, out contentType); + + // downlevel requests cannot specify a folder + if (xmlVersion == FeedXmlVersion.Win7 + && Request.PathInfo.Length != 0) + { + Response.StatusCode = 404; + Response.End(); + } + + HttpContext.Current.Response.ContentType = contentType; + + string rdpRenderMode = HttpContext.Current.Request.Params.Get("rdpRender"); + bool rdpEmbed = !String.IsNullOrEmpty(rdpRenderMode) && rdpRenderMode.Trim().ToLower(CultureInfo.InvariantCulture).Equals("inline"); + + try + { + WebFeed tswf = new WebFeed(rdpEmbed ? RdpType.Both : RdpType.Link, false); + oXML = tswf.GenerateFeed(strUserIdentity, xmlVersion, Request.PathInfo, true); + } + catch (WorkspaceUnknownFolderException) + { + Response.StatusCode = 404; + Response.End(); + } + catch (InvalidTenantException) + { + Response.StatusCode = 404; + Response.End(); + } + catch (WorkspaceUnavailableException wue) + { + // This exception is raised when we cannot contact the appropriate sources to obtain the workspace information. + // This is an edge case that can ocurr e.g. if the cpub server we're pointing to is down. + Response.StatusCode = 503; + // Write a simple text error string to the body, so that if an administrator happens to be accessing the feed via a browser, we can point them in the right direction + // We need to wrap this in some sort of tags, otherwise IE does not display the message (since it expects an XML content-type) + Response.Write("" + wue.Message + ""); + Response.End(); + } + } + } +} diff --git a/RDSFactorWeb/RDWeb/Pages/en-US/Default.aspx b/RDSFactorWeb/RDWeb/Pages/en-US/Default.aspx new file mode 100644 index 0000000..e5e0de1 --- /dev/null +++ b/RDSFactorWeb/RDWeb/Pages/en-US/Default.aspx @@ -0,0 +1,536 @@ + +<% @Page Language="C#" Debug="false" ResponseEncoding="utf-8" ContentType="text/xml" %> +<% @Import Namespace="System.Globalization" %> +<% @Import Namespace="System.Web.Configuration" %> +<% @Import Namespace="System.Security" %> +<% @Import Namespace="Microsoft.TerminalServices.Publishing.Portal.FormAuthentication" %> +<% @Import Namespace="Microsoft.TerminalServices.Publishing.Portal" %> + +<%=""%> +<%=""%> + + + + + + <%=L_RenderFailTitle_Text%> + + +

<%=L_RenderFailTitle_Text%>

+

<%=L_RenderFailP1_Text%>

+

<%=L_RenderFailP2_Text%>

+

<%=L_RenderFailP3_Text%>

+ + +
+ + bFormAuthenticationMode = false; + <% if ( eAuthenticationMode == AuthenticationMode.Forms ) { %> + bFormAuthenticationMode = true; + <% } %> + iSessionTimeout = parseInt("<%=SessionTimeoutInMinutes%>"); + + + + showsignout="true" + <% } %> + activetab="PORTAL_REMOTE_PROGRAMS" + > + <%=L_RemoteAppProgramsLabel_Text%> +<% + if (ConfigurationManager.AppSettings["ShowDesktops"].ToString() == "true") + { +%> + <%=L_DesktopTab_Text%> +<% + } +%> + + + + + + + rdcinstallurl="<%=SecurityElement.Escape(sRDCInstallUrl)%>" + <% + } + %> + > + <%=strAppFeed%> + +
diff --git a/RDSFactorWeb/RDWeb/Pages/en-US/Desktops.aspx b/RDSFactorWeb/RDWeb/Pages/en-US/Desktops.aspx new file mode 100644 index 0000000..13f8dbf --- /dev/null +++ b/RDSFactorWeb/RDWeb/Pages/en-US/Desktops.aspx @@ -0,0 +1,973 @@ + + + +<% @Page Language="C#" Debug="false" ResponseEncoding="utf-8" ContentType="text/xml" %> +<% @Import Namespace="System.Globalization " %> +<% @Import Namespace="System.Web.Configuration" %> +<% @Import Namespace="System.Security" %> +<% @Import Namespace="Microsoft.TerminalServices.Publishing.Portal.FormAuthentication" %> +<% @Import Namespace="Microsoft.TerminalServices.Publishing.Portal" %> + + + + + + + + <%=L_RenderFailTitle_Text%> + + +

<%=L_RenderFailTitle_Text%>

+

<%=L_RenderFailP1_Text%>

+

<%=L_RenderFailP2_Text%>

+

<%=L_RenderFailP3_Text%>

+ + +
+ + bFormAuthenticationMode = false; + <% if ( eAuthenticationMode == AuthenticationMode.Forms ) { %> + bFormAuthenticationMode = true; + <% } %> + iSessionTimeout = parseInt("<%=SessionTimeoutInMinutes%>"); + + + + showsignout="true" + <% } %> + activetab="PORTAL_REMOTE_DESKTOPS" + > + <%=L_RemoteAppProgramsLabel_Text%> + <%=L_DesktopTab_Text%> + + + + + + + + + + + +
  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
<%=L_DesktopDesc_Text%>
<%=L_ConnectionOptionsHeader_Text%>
+ + + + + + + + + + + + + + + + + + + + + + + + +
+ + +   +
+ + +   +
  +   +   +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + +
+ + + + +
+ +
+ + + + + + + + +<% + if ( eAuthenticationMode == AuthenticationMode.Windows ) + { +%> + + + + + + + + + +
  + + + + + + +
+ + <%=L_PrivateLabel_Text %> + (<%=L_MoreInfoLabel_Text %>) + +
+ + + + + + +
+ + +<% + } +%> +
+
+ + diff --git a/RDSFactorWeb/RDWeb/Pages/en-US/RDWAStrings.xml b/RDSFactorWeb/RDWeb/Pages/en-US/RDWAStrings.xml new file mode 100644 index 0000000..18d5d5c --- /dev/null +++ b/RDSFactorWeb/RDWeb/Pages/en-US/RDWAStrings.xml @@ -0,0 +1,22 @@ + + + RD Web Access + +

RD Web Access requires JScript. This Web browser either does not support JScript, or scripts are being blocked.

+
+
+

To find out whether your browser supports JScript, or to allow scripts, see the browser's online Help.

+
+ RD Web Access + RemoteApp and Desktop Connection + Help + Sign out + Searching for available RemoteApp programs...  + Current folder: + Up + Optimize my experience for a LAN network when connecting to the computer or application. + I am using a private computer that complies with my organization's security policy. + More information... + By selecting this option you can save your credentials so that they can be used in the future when connecting to these programs. Before you select this option, please ensure that saving your credentials is in compliance with your organization's security policy. + Hide additional information... +
diff --git a/RDSFactorWeb/RDWeb/Pages/en-US/login.aspx b/RDSFactorWeb/RDWeb/Pages/en-US/login.aspx new file mode 100644 index 0000000..3d55a87 --- /dev/null +++ b/RDSFactorWeb/RDWeb/Pages/en-US/login.aspx @@ -0,0 +1,633 @@ + + + +<% @Page Language="C#" Debug="false" ResponseEncoding="utf-8" ContentType="text/xml" %> +<% @Import Namespace="System " %> +<% @Import Namespace="System.Security" %> +<% @Import Namespace="Microsoft.TerminalServices.Publishing.Portal.FormAuthentication" %> +<% @Import Namespace="Microsoft.TerminalServices.Publishing.Portal" %> + + + + + + + <%=L_RenderFailTitle_Text%> + + +

<%=L_RenderFailTitle_Text%>

+

<%=L_RenderFailP1_Text%>

+

<%=L_RenderFailP2_Text%>

+

<%=L_RenderFailP3_Text%>

+ + +
+ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <% + strErrorMessageRowStyle = "style=\"display:none\""; + if ( bPasswordExpiredNoChange == true) + { + strErrorMessageRowStyle = "style=\"display:\""; + } + %> + > + + + + <% + strErrorMessageRowStyle = "style=\"display:none\""; + if ( bPasswordExpired == true) + { + strErrorMessageRowStyle = "style=\"display:\""; + } + %> + > + + + + <% + strErrorMessageRowStyle = "style=\"display:none\""; + if ( bWorkspaceInUse == true ) + { + strErrorMessageRowStyle = "style=\"display:\""; + } + %> + > + + + + <% + strErrorMessageRowStyle = "style=\"display:none\""; + if ( bWorkspaceDisconnected == true ) + { + strErrorMessageRowStyle = "style=\"display:\""; + } + %> + > + + + + <% + strErrorMessageRowStyle = "style=\"display:none\""; + if ( bFailedLogon == true ) + { + strErrorMessageRowStyle = "style=\"display:\""; + } + %> + > + + + + + + + + <% + strErrorMessageRowStyle = "style=\"display:none\""; + if ( bFailedAuthorization || bFailedAuthorizationOverride ) + { + strErrorMessageRowStyle = "style=\"display:\""; + } + %> + > + + + + <% + strErrorMessageRowStyle = "style=\"display:none\""; + if ( bServerConfigChanged ) + { + strErrorMessageRowStyle = "style=\"display:\""; + } + %> + > + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+
diff --git a/RDSFactorWeb/RDWeb/Pages/en-US/logoff.aspx b/RDSFactorWeb/RDWeb/Pages/en-US/logoff.aspx new file mode 100644 index 0000000..e3dc1e2 --- /dev/null +++ b/RDSFactorWeb/RDWeb/Pages/en-US/logoff.aspx @@ -0,0 +1,65 @@ +<% @Page Language="C#" Debug="true" %> + + diff --git a/RDSFactorWeb/RDWeb/Pages/en-US/password.aspx b/RDSFactorWeb/RDWeb/Pages/en-US/password.aspx new file mode 100644 index 0000000..7567834 Binary files /dev/null and b/RDSFactorWeb/RDWeb/Pages/en-US/password.aspx differ diff --git a/RDSFactorWeb/RDWeb/Pages/en-US/rap-help.htm b/RDSFactorWeb/RDWeb/Pages/en-US/rap-help.htm new file mode 100644 index 0000000..9acd479 --- /dev/null +++ b/RDSFactorWeb/RDWeb/Pages/en-US/rap-help.htm @@ -0,0 +1,429 @@ + + + + +RD Web Access Help + + + + + + + + +
+

For the most current version of this information, see http://go.microsoft.com/fwlink/?LinkId=141038.

+

The Remote Desktop Web Access (RD Web Access) Web site enables you to use a web browser to access RemoteApp and Desktop Connections.

+
+

Help Topics

+ + +
+

 

+

 

+

 

+

 

+

 

+

 

+

 

+

 

+

 

+

 

+

 

+

 

+

 

+

 

+

 

+

 

+

 

+

 

+

 

+

 

+

 

+

 

+

 

+

 

+

 

+

 

+

 

+

 

+

 

+

 

+

 

+

 

+

What is RemoteApp and Desktop Connection?

+

RemoteApp and Desktop Connection gives you a customized view of RemoteApp programs and virtual desktops + that have been made available to you by your network administrator.

+

Back to topics

+ +
+

 

+

 

+

 

+

 

+

 

+

 

+

 

+

 

+

 

+

 

+

 

+

 

+

 

+

 

+

 

+

 

+

 

+

 

+

 

+

 

+

 

+

 

+

 

+

 

+

 

+

 

+

 

+

 

+

 

+

 

+

 

+

 

+

What is RemoteApp?

+

Using RemoteApp, you can access programs on a remote computer through Remote Desktop Services. + Although the programs are running on a remote computer, RemoteApp programs behave as if they are running on your local computer. + For example, a RemoteApp program has its own entry in the taskbar, and you can resize, minimize, or maximize the program window.

+

Back to topics

+ +
+

 

+

 

+

 

+

 

+

 

+

 

+

 

+

 

+

 

+

 

+

 

+

 

+

 

+

 

+

 

+

 

+

 

+

 

+

 

+

 

+

 

+

 

+

 

+

 

+

 

+

 

+

 

+

 

+

 

+

 

+

 

+

 

+ +

Starting a RemoteApp program

+

To start a RemoteApp program or Remote Desktop session, + click the program icon in RD Web Access. When you're prompted for user credentials, + log on with your network user name and password.

+

Back to topics

+ +
+

 

+

 

+

 

+

 

+

 

+

 

+

 

+

 

+

 

+

 

+

 

+

 

+

 

+

 

+

 

+

 

+

 

+

 

+

 

+

 

+

 

+

 

+

 

+

 

+

 

+

 

+

 

+

 

+

 

+

 

+

 

+

 

+ +

What is the Remote Desktop tab?

+

The Remote Desktop tab allows you to connect from the RD Web Access website + to any desktop that is configured to accept Remote Desktop connections.

+

Back to topics

+ +
+

 

+

 

+

 

+

 

+

 

+

 

+

 

+

 

+

 

+

 

+

 

+

 

+

 

+

 

+

 

+

 

+

 

+

 

+

 

+

 

+

 

+

 

+

 

+

 

+

 

+

 

+

 

+

 

+

 

+

 

+

 

+

 

+ +

Public vs. private computer settings

+

If you connect to the RD Web Access site from a public computer, + such as a kiosk computer in a public establishment, or from a computer that you share with other users, + click This is a public or shared computer. You will need to provide both your user name and password + each time you sign in to the RD Web Access website.

+If you're using a work computer assigned to you, that you don't share with other people, click +This is a private computer. Your user name will be remembered, so you'll only have to provide your password +each time you sign in to the RD Web Access website.

+To protect against unauthorized access, RD Web Access sessions automatically end after a period of inactivity. + If your RD Web Access session ends, you'll need to sign in again. The amount of time before a session ends + is determined by your administrator. +

+

Back to topics

+ +
+

 

+

 

+

 

+

 

+

 

+

 

+

 

+

 

+

 

+

 

+

 

+

 

+

 

+

 

+

 

+

 

+

 

+

 

+

 

+

 

+

 

+

 

+

 

+

 

+

 

+

 

+

 

+

 

+

 

+

 

+

 

+

 

+ +

Computer requirements

+

To use RD Web Access, your computer must be running at least Internet Explorer 6.0 and + a version of Remote Desktop Connection (RDC) that supports at least Remote Desktop Protocol (RDP) 6.1.

+ To determine the RDP version that RDC supports, start Remote Desktop Connection, + click the icon in the upper-left corner of the Remote Desktop Connection dialog box, and then click About. + The RDP version that RDC supports is listed in the About Remote Desktop Connection dialog box.

+ RDC 6.1 supports Remote Desktop Protocol 6.1. RDC 6.1 is included with the following operating systems:

+

+ + The version of RDC in Windows 7 and Windows Server 2008 R2 supports RDP 7.0.

+ Additionally, the Remote Desktop Services ActiveX Client control must be enabled. The ActiveX control + is included with RDC 6.1 and the version of RDC in Windows 7 and Windows Server 2008 R2.

+ The version of RDC that you're using determines which features of RD Web Access are available to you.

+ For more information about client requirements for using RD Web Access, see + http://go.microsoft.com/fwlink/?LinkId=142240. +

+

Back to topics

+ +
+

 

+

 

+

 

+

 

+

 

+

 

+

 

+

 

+

 

+

 

+

 

+

 

+

 

+

 

+

 

+

 

+

 

+

 

+

 

+

 

+

 

+

 

+

 

+

 

+

 

+

 

+

 

+

 

+

 

+

 

+

 

+

 

+

I am prompted to run the Remote Desktop Services ActiveX Client control. How can I do that?

+

If you're prompted to run the Remote Desktop Services ActiveX Client control when you access RD Web Access, + do either of the following, depending on your operating system: +

+ + If the Internet Explorer Information bar doesn't appear, you can enable the ActiveX control by using + the Manage Add-ons tool on the Tools menu of Internet Explorer.

+ If your computer meets all of the client requirements but you do not see any programs listed, + contact your network administrator or the webmaster of the website. +

+

Back to topics

+ +
+

 

+

 

+

 

+

 

+

 

+

 

+

 

+

 

+

 

+

 

+

 

+

 

+

 

+

 

+

 

+

 

+

 

+

 

+

 

+

 

+

 

+

 

+

 

+

 

+

 

+

 

+

 

+

 

+

 

+

 

+

 

+

 

+ + + + + + diff --git a/RDSFactorWeb/RDWeb/Pages/en-US/tswa.css b/RDSFactorWeb/RDWeb/Pages/en-US/tswa.css new file mode 100644 index 0000000..05ee1b9 --- /dev/null +++ b/RDSFactorWeb/RDWeb/Pages/en-US/tswa.css @@ -0,0 +1,284 @@ + +#content +{ + position:relative; + height:490px; + background-color:white; + color:Black; + vertical-align:top; + margin:0px; + padding:5px; +} + +#homemain +{ + position:relative; + top:0px; + width:900px; + margin-top:0px; + padding:0px; + background-color:Transparent; + text-align:left; + z-index:0; +} + +body +{ + background-image: url(../images/bg_globe_01.jpg); + background-attachment: fixed; + background-repeat: no-repeat; + background-position: center center; + margin-left: 0px; + margin-top: 0px; + margin-right: 0px; + margin-bottom: 0px; + background-color: #7fa4bf; +} + +body,td,th,select +{ + font-family: "Segoe UI", "Calibri", Tahoma, sans-serif; + font-size: 12px; + color: #000000; +} + +.pageBorder +{ + border: 1px solid #444444; +} + +.textInputField +{ + font-family: "Segoe UI", "Calibri", Tahoma, sans-serif; + font-size: 12px; + color: #000000; + background-color: #EAF4FF; +} + +.formButton +{ + font-family: "Segoe UI", "Calibri", Tahoma, sans-serif; + font-size: 12px; + color: #000000; +} + +/* Style for the Apply button in the Web-Part Edit Zone */ +#ApplyButton +{ + font-family: "Segoe UI", "Calibri", Tahoma, sans-serif; + font-size: 12px; + color: #000000; +} + + +.wrng +{ + color: #C00000 +} + +.expl +{ + color: #336699 +} + + +.headingCompanyName +{ + font-size: 24px; + font-family: "Segoe UI", "Calibri", Tahoma, sans-serif; +} + + +td.cellMSLogo > table +{ + margin-right:0; + margin-left:auto; +} + +td.cellSecondaryNavigationBar > table +{ + margin-right:0; + margin-left:auto; +} + +.headingApplicationName +{ + font-size: 12px; +} + +.headingTSWA +{ + font-size: 11px; +} + +.headingForActivePageInNavigationBar +{ + font-size: 14px; + font-weight: bold; + color: #336699; +} + +.linkPrimaryNavigiationBar a +{ + color: #000000; + text-decoration: none; + font-size: 14px; + font-weight: bold; +} + +.linkPrimaryNavigiationBar a:hover +{ + color: #336699; + text-decoration: underline; +} + + +.linkSecondaryNavigiationBar a +{ + color: #000000; + text-decoration: none; + font-size: 14px; + font-weight: bold; +} + +.linkSecondaryNavigiationBar a:hover +{ + color: #336699; + text-decoration: underline; +} + +.dividerInNavigationBar +{ + color: #CCCCCC; +} + +.tswa_appboard +{ + background-color:transparent; + position:relative; + top:18px; + font-size:12px; +} + +.tswa_boss, .tswa_folder_boss, .tswa_up_boss +{ + position:relative; + width:83px; + height:90px; + margin:0px; + padding:0px; + background-color:Transparent; + text-align:center; + vertical-align:middle; + float:left; +} + +.tswa_boss_spacer +{ + margin: 0px; + padding: 12px 1px 0px 4px; +} + +.tswa_boss_img +{ + border:none; +} + +.tswa_iconimg +{ + position:relative; + margin:0px; + top:-4px; + width:32px; + height:32px; + text-align:center; +} + +.tswa_ttext +{ + position:relative; + top:-1px; + width:70px; + height:42px; + font-size:11px; + line-height:13px; + text-overflow:ellipsis; + overflow:hidden; + text-align:center; +} + +.tswa_vis0 +{ + visibility:hidden; + position:absolute; + top:0px; + left:3px; + height:85px; + width:77px; + background-color:Transparent; +} + +.tswa_vis1 +{ + visibility:visible; + position:absolute; + top:0px; + left:3px; + height:85px; + width:77px; + background-color:Transparent; +} + +.tswa_PublicCheckboxMore +{ + position:relative; + font-size:12px; +} + +.tswa_PublicCheckboxLess +{ + position:relative; + font-size:12px; +} + +.tswa_ShowOptimizeExperienceShiftedUp +{ + position:relative; + font-size:12px; +} + +.tswa_ShowOptimizeExperience +{ + position:relative; + font-size:12px; +} + +.tswa_error_icon +{ + background-color:Transparent; + font-size:17px; + line-height:32px; + height:32px; + width:300px; + filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true, src='../images/erroricon.png',sizingMethod='crop'); + margin-left:10px; + padding-left:45px +} + +.tswa_error_msg +{ + font-size:12px; + margin-left:55px; + padding-right:10px; +} + +.tswa_CurrentFolderLabel +{ + font-family: "Segoe UI", "Calibri", Tahoma, sans-serif; + color: #000000; + font-weight: bold; + font-size: 14px; + text-decoration : none; + margin-left: 25px; + margin-bottom: 10px; +} diff --git a/RDSFactorWeb/RDWeb/Pages/images/Ivmo.png b/RDSFactorWeb/RDWeb/Pages/images/Ivmo.png new file mode 100644 index 0000000..1e10edc Binary files /dev/null and b/RDSFactorWeb/RDWeb/Pages/images/Ivmo.png differ diff --git a/RDSFactorWeb/RDWeb/Pages/images/WS_h_c.png b/RDSFactorWeb/RDWeb/Pages/images/WS_h_c.png new file mode 100644 index 0000000..46da951 Binary files /dev/null and b/RDSFactorWeb/RDWeb/Pages/images/WS_h_c.png differ diff --git a/RDSFactorWeb/RDWeb/Pages/images/Warning24.png b/RDSFactorWeb/RDWeb/Pages/images/Warning24.png new file mode 100644 index 0000000..1d28fae Binary files /dev/null and b/RDSFactorWeb/RDWeb/Pages/images/Warning24.png differ diff --git a/RDSFactorWeb/RDWeb/Pages/images/banner_01.jpg b/RDSFactorWeb/RDWeb/Pages/images/banner_01.jpg new file mode 100644 index 0000000..bd7a96b Binary files /dev/null and b/RDSFactorWeb/RDWeb/Pages/images/banner_01.jpg differ diff --git a/RDSFactorWeb/RDWeb/Pages/images/banner_02.jpg b/RDSFactorWeb/RDWeb/Pages/images/banner_02.jpg new file mode 100644 index 0000000..5268fdb Binary files /dev/null and b/RDSFactorWeb/RDWeb/Pages/images/banner_02.jpg differ diff --git a/RDSFactorWeb/RDWeb/Pages/images/bar_03.jpg b/RDSFactorWeb/RDWeb/Pages/images/bar_03.jpg new file mode 100644 index 0000000..2e1d60a Binary files /dev/null and b/RDSFactorWeb/RDWeb/Pages/images/bar_03.jpg differ diff --git a/RDSFactorWeb/RDWeb/Pages/images/bg_globe_01.jpg b/RDSFactorWeb/RDWeb/Pages/images/bg_globe_01.jpg new file mode 100644 index 0000000..e87ec1b Binary files /dev/null and b/RDSFactorWeb/RDWeb/Pages/images/bg_globe_01.jpg differ diff --git a/RDSFactorWeb/RDWeb/Pages/images/bottom_left.png b/RDSFactorWeb/RDWeb/Pages/images/bottom_left.png new file mode 100644 index 0000000..6b1af67 Binary files /dev/null and b/RDSFactorWeb/RDWeb/Pages/images/bottom_left.png differ diff --git a/RDSFactorWeb/RDWeb/Pages/images/bottom_mid.png b/RDSFactorWeb/RDWeb/Pages/images/bottom_mid.png new file mode 100644 index 0000000..b2ae251 Binary files /dev/null and b/RDSFactorWeb/RDWeb/Pages/images/bottom_mid.png differ diff --git a/RDSFactorWeb/RDWeb/Pages/images/bottom_right.png b/RDSFactorWeb/RDWeb/Pages/images/bottom_right.png new file mode 100644 index 0000000..5e4e004 Binary files /dev/null and b/RDSFactorWeb/RDWeb/Pages/images/bottom_right.png differ diff --git a/RDSFactorWeb/RDWeb/Pages/images/clear.gif b/RDSFactorWeb/RDWeb/Pages/images/clear.gif new file mode 100644 index 0000000..e66849a Binary files /dev/null and b/RDSFactorWeb/RDWeb/Pages/images/clear.gif differ diff --git a/RDSFactorWeb/RDWeb/Pages/images/erroricon.png b/RDSFactorWeb/RDWeb/Pages/images/erroricon.png new file mode 100644 index 0000000..40e655b Binary files /dev/null and b/RDSFactorWeb/RDWeb/Pages/images/erroricon.png differ diff --git a/RDSFactorWeb/RDWeb/Pages/images/folder.png b/RDSFactorWeb/RDWeb/Pages/images/folder.png new file mode 100644 index 0000000..e73a31d Binary files /dev/null and b/RDSFactorWeb/RDWeb/Pages/images/folder.png differ diff --git a/RDSFactorWeb/RDWeb/Pages/images/left_mid.png b/RDSFactorWeb/RDWeb/Pages/images/left_mid.png new file mode 100644 index 0000000..6047041 Binary files /dev/null and b/RDSFactorWeb/RDWeb/Pages/images/left_mid.png differ diff --git a/RDSFactorWeb/RDWeb/Pages/images/logo_01.png b/RDSFactorWeb/RDWeb/Pages/images/logo_01.png new file mode 100644 index 0000000..2fcf024 Binary files /dev/null and b/RDSFactorWeb/RDWeb/Pages/images/logo_01.png differ diff --git a/RDSFactorWeb/RDWeb/Pages/images/logo_02.png b/RDSFactorWeb/RDWeb/Pages/images/logo_02.png new file mode 100644 index 0000000..2119540 Binary files /dev/null and b/RDSFactorWeb/RDWeb/Pages/images/logo_02.png differ diff --git a/RDSFactorWeb/RDWeb/Pages/images/mslogo_black.png b/RDSFactorWeb/RDWeb/Pages/images/mslogo_black.png new file mode 100644 index 0000000..a31ff34 Binary files /dev/null and b/RDSFactorWeb/RDWeb/Pages/images/mslogo_black.png differ diff --git a/RDSFactorWeb/RDWeb/Pages/images/rapwait.gif b/RDSFactorWeb/RDWeb/Pages/images/rapwait.gif new file mode 100644 index 0000000..49aba1c Binary files /dev/null and b/RDSFactorWeb/RDWeb/Pages/images/rapwait.gif differ diff --git a/RDSFactorWeb/RDWeb/Pages/images/right_mid.png b/RDSFactorWeb/RDWeb/Pages/images/right_mid.png new file mode 100644 index 0000000..0cac440 Binary files /dev/null and b/RDSFactorWeb/RDWeb/Pages/images/right_mid.png differ diff --git a/RDSFactorWeb/RDWeb/Pages/images/top_left.png b/RDSFactorWeb/RDWeb/Pages/images/top_left.png new file mode 100644 index 0000000..08f9ea9 Binary files /dev/null and b/RDSFactorWeb/RDWeb/Pages/images/top_left.png differ diff --git a/RDSFactorWeb/RDWeb/Pages/images/top_mid.png b/RDSFactorWeb/RDWeb/Pages/images/top_mid.png new file mode 100644 index 0000000..8327930 Binary files /dev/null and b/RDSFactorWeb/RDWeb/Pages/images/top_mid.png differ diff --git a/RDSFactorWeb/RDWeb/Pages/images/top_right.png b/RDSFactorWeb/RDWeb/Pages/images/top_right.png new file mode 100644 index 0000000..6513be1 Binary files /dev/null and b/RDSFactorWeb/RDWeb/Pages/images/top_right.png differ diff --git a/RDSFactorWeb/RDWeb/Pages/images/up.png b/RDSFactorWeb/RDWeb/Pages/images/up.png new file mode 100644 index 0000000..ca50eca Binary files /dev/null and b/RDSFactorWeb/RDWeb/Pages/images/up.png differ diff --git a/RDSFactorWeb/RDWeb/Pages/renderscripts.js b/RDSFactorWeb/RDWeb/Pages/renderscripts.js new file mode 100644 index 0000000..842af55 --- /dev/null +++ b/RDSFactorWeb/RDWeb/Pages/renderscripts.js @@ -0,0 +1,613 @@ +var helpPopup = null; +var strTSWACookieName = "TSWAAuthClientSideCookie"; +var strTransparentGif = "../images/clear.gif"; +var g_objWorkspace = null; +var g_activeXSSOMode = false; +var g_activeXSSOModeSet = false; +var g_workspaceObjectVersion = -1; +var bFormAuthenticationMode = false; +var iSessionTimeout = 0; +var iConstSecToMilliSec = 1000; +var iConstMinuteToMilliSec = (60 * iConstSecToMilliSec); +var iConstPreAutoDisconnectFactor = (4 / 5); // To make it 80% of iAutoDisconnectSessionTimeout. +var iConstPreAutoDisconnectThreshold = (2 * iConstSecToMilliSec); // After which onPreAutoDisconnect should not be set. +var iAutoDisconnectTimerId = null; +var iPreAutoDisconnectTimerId = null; +var iAutoDisconnectSessionTimeout = 0; +var iPreAutoDisconnectSessionTimeout = 0; +var objPageLoadTime = null; +var objLastUserActivityTime = null; +var objXmlHttp = null; +var bAsyncPageRequestSucceeded = false; +var bIsUserActive = false; +var strBaseUrl = ""; + + +function clearAutoDisconnectTimer() +{ + if ( iAutoDisconnectTimerId != null ) + { + clearTimeout( iAutoDisconnectTimerId ); + iAutoDisconnectTimerId = null; + } +} + +function clearPreAutoDisconnectTimer() +{ + if ( iPreAutoDisconnectTimerId != null ) + { + clearTimeout( iPreAutoDisconnectTimerId ); + iPreAutoDisconnectTimerId = null; + } +} + +function onPageload(e) { + // + // Browser Name in the form : 'MSIE x.x'. + // + var iePattern = /MSIE (\d+)\./; + var ieMatch = iePattern.exec(window.navigator.userAgent); + + if (ieMatch) { + if (parseInt(ieMatch[1]) <= 6) + { + ApplyPngTransparency(); + } + } +} + +function onPageUnload(e) +{ + clearAutoDisconnectTimer(); + clearPreAutoDisconnectTimer(); + if ( helpPopup != null && helpPopup.closed == false ) + { + helpPopup.close(); + } +} + +function onAuthenticatedPageload(e) +{ + if ( bFormAuthenticationMode == true ) + { + objLastUserActivityTime = objPageLoadTime = new Date(); + iAutoDisconnectSessionTimeout = (iSessionTimeout * iConstMinuteToMilliSec); + iPreAutoDisconnectSessionTimeout = (iConstPreAutoDisconnectFactor * iAutoDisconnectSessionTimeout); + + // + // Show Workspace Notification + // Setup onAutoDisconnect timer regardless of onAuthenticated succcess/failure to preserve old behavior + // + onAuthenticated(); + iAutoDisconnectTimerId = setTimeout( "onAutoDisconnect()", iAutoDisconnectSessionTimeout ); + // + // Setup onPreAutoDisconnect timer to keep web and workspace runtime in sync with user activity + // if the workspace runtime supports OnAuthenticatedEx i.e. updating expiry timer. + // + if ( iPreAutoDisconnectSessionTimeout > iConstPreAutoDisconnectThreshold ) + { + iPreAutoDisconnectTimerId = setTimeout( "onPreAutoDisconnect()", iPreAutoDisconnectSessionTimeout ); + } + } + onPageload(e); +} + +function onClickHelp() +{ + if ( helpPopup == null || helpPopup.closed == true ) + { + helpPopup = window.open( sHelpSource, + "_blank", + "height=600px, width=600px, left=600, top=150, toolbar=no, resizable=yes, scrollbars=yes, menubar=no" ); + } + else + { + helpPopup.close(); + helpPopup = null; + } +} + +function onAutoDisconnect() +{ + if ( bAsyncPageRequestSucceeded ) + { + return; + } + + var iErrorCode; + var objWorkspace = null; + var strWorkspaceId = ""; + var strCookieContents = getCookieContents(strTSWACookieName); + + if ( null != strCookieContents ) + { + strWorkspaceId = decodeURIComponent( getCookieCrumbValue(strCookieContents, "WorkSpaceID") ); + } + + if (strWorkspaceId != null && + strWorkspaceId != "" && + GetActiveXSSOMode()) + { + try + { + objWorkspace = GetWorkspaceObject(); + objWorkspace.ClearWorkspaceCredential( strWorkspaceId ); + } + catch (objException) + { + objWorkspace = null; + iErrorCode = (objException.number & 0xFFFF); + } + } + + window.location = strBaseUrl + "LogOff.aspx" + window.location.search; +} + +function onUserDisconnect() +{ + var objWorkspace = null; + var iErrorCode; + var strWorkspaceId = ""; + var strCookieContents = getCookieContents(strTSWACookieName); + + if ( null != strCookieContents ) + { + strWorkspaceId = decodeURIComponent( getCookieCrumbValue(strCookieContents, "WorkSpaceID") ); + } + + if (strWorkspaceId != null && + strWorkspaceId != "" && + GetActiveXSSOMode()) + { + try + { + objWorkspace = GetWorkspaceObject(); + objWorkspace.DisconnectWorkspace( strWorkspaceId ); + } + catch (objException) + { + objWorkspace = null; + iErrorCode = (objException.number & 0xFFFF); + } + } + + window.location = strBaseUrl + "LogOff.aspx" + window.location.search; +} + +function onClickSecurity() { + var bPrivateMode = document.getElementById("rdoPrvt").checked; + var objPassword = document.getElementById("UserPass"); + var objDomainUserName = document.getElementById("DomainUserName"); + + if (GetActiveXSSOMode()) { + document.getElementById("trPrvtWrn").style.display = bPrivateMode ? "" : "none"; + } + + if ( bPrivateMode ) + { + document.FrmLogin["flags"].value |= 4; + if ( objPassword && objDomainUserName ) + { + objPassword.setAttribute("autocomplete", "on"); + objDomainUserName.setAttribute("autocomplete", "on"); + } + } + else + { + document.FrmLogin["flags"].value &= ~4; + if ( objPassword && objDomainUserName ) + { + objPassword.setAttribute("autocomplete", "off"); + objDomainUserName.setAttribute("autocomplete", "off"); + } + } +} + +function showElement(objElement) +{ + objElement.style.display = ""; +} + +function hideElement(objElement) +{ + objElement.style.display = "none"; +} + +function onclickExplanation(id) +{ + var objElement = document.getElementById(id); + if ( objElement.tagName=="IMG" ) + { + objElement = objElement.parentElement; + } + + switch(objElement) + { + case document.getElementById("lnkShwSec"): + hideElement(document.getElementById("lnkShwSec")); + showElement(document.getElementById("lnkHdSec")); + showElement(document.getElementById("trPubExp")); + showElement(document.getElementById("trPrvtExp")); + document.getElementById("lnkHdSec").focus(); + break; + + case document.getElementById("lnkHdSec"): + showElement(document.getElementById("lnkShwSec")); + hideElement(document.getElementById("lnkHdSec")); + hideElement(document.getElementById("trPubExp")); + hideElement(document.getElementById("trPrvtExp")); + document.getElementById("lnkShwSec").focus(); + break; + } +} + +function getCookieContents(strNameOfCookie) +{ + var objCookieContents = null; + var iStartIndex, iEndIndex; + + if ( strNameOfCookie != null && + strNameOfCookie != "" && + document.cookie.length > 0 ) + { + iStartIndex = document.cookie.indexOf( strNameOfCookie + "=" ); + if ( iStartIndex != -1 ) + { + iStartIndex = iStartIndex + strNameOfCookie.length + 1; + iEndIndex = document.cookie.indexOf( ";", iStartIndex ); + if ( iEndIndex == -1 ) + { + iEndIndex = document.cookie.length; + } + objCookieContents = document.cookie.substring( iStartIndex, iEndIndex ); + } + } + return objCookieContents; +} + +function getCookieCrumbValue(strCookieContents, strCookieCrumbName) +{ + var strCookieCrumbValue = ""; + + if ( strCookieContents != null && + strCookieContents != "" && + strCookieCrumbName != null && + strCookieCrumbName != "" + ) + { + // + // strCookieContents is in the form '=&='. + // + var objCookieCrumbs = strCookieContents.split("&"); + for (var iIndex = 0; iIndex < objCookieCrumbs.length; iIndex++) + { + var objCookieCrumb = objCookieCrumbs[iIndex].split("="); + + if ( strCookieCrumbName.toLowerCase() == objCookieCrumb[0].toLowerCase() ) + { + strCookieCrumbValue = objCookieCrumb[1]; + break; + } + else + { + continue; + } + } + } + + return strCookieCrumbValue; +} + +function onAuthenticated() +{ + var iErrorCode; + var objWorkspace = null; + var bCountUnauthenticatedCredentials = true; + var bIsOnAuthenticatedCalled = false; + var bIsWorkspaceCredentialSpecified = false; + var objForm = document.getElementById("FrmUserInfo"); + var strLoggedOnDomainUserName = objForm.elements["DomainUserName"].value; + + var strCookieContents = getCookieContents(strTSWACookieName); + var strWorkspaceId = decodeURIComponent( getCookieCrumbValue(strCookieContents, "WorkSpaceID") ); + var strDomainUserName = decodeURIComponent( getCookieCrumbValue(strCookieContents, "Name") ); + + if ( strWorkspaceId != null && strWorkspaceId != "" ) + { + if ( strDomainUserName == null || strDomainUserName == "" || + strLoggedOnDomainUserName == null || strLoggedOnDomainUserName == "" + ) + { + // + // This should never happen. + // + return; + } + + var strQueryStringPreamble = "?"; + if (window.location.search) { + strQueryStringPreamble = window.location.search + "&"; + } + + if ( strDomainUserName.toLowerCase() == strLoggedOnDomainUserName.toLowerCase()) { + if (GetActiveXSSOMode()) { + try { + objWorkspace = GetWorkspaceObject(); + bIsWorkspaceCredentialSpecified = objWorkspace.IsWorkspaceCredentialSpecified(strWorkspaceId, + bCountUnauthenticatedCredentials); + if (bIsWorkspaceCredentialSpecified) { + bIsOnAuthenticatedCalled = true; + objWorkspace.OnAuthenticated(strWorkspaceId, strDomainUserName); + } + } + catch (objException) { + objWorkspace = null; + iErrorCode = (objException.number & 0xFFFF); + + if (bIsOnAuthenticatedCalled) { + // + // 183 = ERROR_ALREADY_EXISTS. + // + if (iErrorCode == 183) { + window.location = strBaseUrl + "LogOff.aspx" + strQueryStringPreamble + "Error=WkSInUse"; + } + // + // 1168 = ERROR_NOT_FOUND. + // + if (iErrorCode == 1168) { + window.location = strBaseUrl + "LogOff.aspx" + strQueryStringPreamble + "Error=WkSDisconnected"; + } + } + } + } + } + else + { + // + // Ideally check workspace state before redirecting; if it has been authenticatd as well. + // + window.location = strBaseUrl + "LogOff.aspx" + strQueryStringPreamble + "Error=WkSInUse"; + } + } +} + +function GetWorkspaceObject() +{ + if( g_objWorkspace == null ) + { + var objClientShell = new ActiveXObject("MsRdpWebAccess.MsRdpClientShell"); + + g_objWorkspace = objClientShell.MsRdpWorkspace3; + if(g_objWorkspace != null) + { + g_workspaceObjectVersion = 3; + } + else + { + g_objWorkspace = objClientShell.MsRdpWorkspace2; + if(g_objWorkspace != null) + { + g_workspaceObjectVersion = 2; + } + else + { + g_objWorkspace = objClientShell.MsRdpWorkspace; + if(g_objWorkspace != null) + { + g_workspaceObjectVersion = 1; + } + else + { + g_workspaceObjectVersion = 0; + } + } + } + } + + return g_objWorkspace; +} + +function GetActiveXSSOMode() { + + if (!g_activeXSSOModeSet) { + g_activeXSSOMode = false; + + try { + if (GetWorkspaceObject() != null) { + g_activeXSSOMode = true; + } + } + catch (objException) { + } + + g_activeXSSOModeSet = true; + } + + return g_activeXSSOMode; +} + +function GetWorkspaceObjectVersion() +{ + if (g_workspaceObjectVersion == -1) { + try { + GetWorkspaceObject(); + } + catch (objException) { + } + } + + return g_workspaceObjectVersion; +} + +function ApplyPngTransparency() +{ + var objDocumentElements = document.all; + var objElement; + + for (var iIndex = objDocumentElements.length - 1; iIndex >=0; iIndex--) + { + objElement = objDocumentElements[iIndex]; + // background pngs + if ( objElement.currentStyle.backgroundImage.match(/\.png/i) != null ) + { + ApplyPngTransparencyToBackground(objElement); + } + // image elements + if ( objElement.tagName == 'IMG' && objElement.src.match(/\.png$/i) != null ) + { + ApplyPngTransparencyToImage(objElement); + } + } +} + +function ApplyPngTransparencyToBackground(objBackground) +{ + var strSizingMethod = 'scale'; + var strBackgroundImageUrl = objBackground.currentStyle.backgroundImage; + var strBackgroundImage = strBackgroundImageUrl.substring(5, strBackgroundImageUrl.length-2); + + if ( objBackground.currentStyle.backgroundRepeat == 'no-repeat' ) + { + strSizingMethod = 'crop'; + } + objBackground.style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + strBackgroundImage + "', sizingMethod='" + strSizingMethod + "')"; + objBackground.style.backgroundImage = 'url(' + strTransparentGif + ')'; +} + +function ApplyPngTransparencyToImage(objImage) +{ + var strImage = objImage.src; + objImage.style.width = objImage.width + "px"; + objImage.style.height = objImage.height + "px"; + objImage.style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + strImage + "', sizingMethod='scale')"; + objImage.src = strTransparentGif; +} + +function getUserNameRdpProperty() +{ + var strUserNameRdpProperty = ""; + var strCookieContents = getCookieContents(strTSWACookieName); + var strDomainUserName = decodeURIComponent( getCookieCrumbValue(strCookieContents, "Name") ); + + if ( strDomainUserName != null && strDomainUserName != "" ) + { + strUserNameRdpProperty = "UserName:s:" + strDomainUserName + "\n"; + } + + return strUserNameRdpProperty; +} + +function getXmlHttpObject() +{ + if ( objXmlHttp == null ) + { + if ( window.XMLHttpRequest ) + { + // code for IE7+, Firefox, Chrome, Opera, Safari + objXmlHttp = new XMLHttpRequest(); + } + else if ( window.ActiveXObject ) + { + // code for IE6, IE5 + objXmlHttp = new ActiveXObject("Microsoft.XMLHTTP"); + } + } + return objXmlHttp; +} + +function onXmlHttpRequestStateChanged() +{ + if ( objXmlHttp.readyState == 4 && objXmlHttp.status == 200 ) + { + // + // Set 'bAsyncPageRequestSucceeded' flag to true + // to prevent onAutoDisconnect from disconnecting workspace. + // + bAsyncPageRequestSucceeded = true; + + // + // Calculate User Acivity Window and call into workspace runtime asking to update the timeout. + // + var objCurrentTime = new Date(); + var iRemainingAutoDisconnectSessionTimeout = iAutoDisconnectSessionTimeout - (objCurrentTime.getTime() - objLastUserActivityTime.getTime()); + + onAuthenticated(); + iAutoDisconnectSessionTimeout = iRemainingAutoDisconnectSessionTimeout; + iPreAutoDisconnectSessionTimeout = (iConstPreAutoDisconnectFactor * iAutoDisconnectSessionTimeout); + objLastUserActivityTime = objPageLoadTime = objCurrentTime; + + // + // Reset AutoDisconnect timers. + // + clearAutoDisconnectTimer(); + clearPreAutoDisconnectTimer(); + if ( iPreAutoDisconnectSessionTimeout > iConstPreAutoDisconnectThreshold ) + { + iPreAutoDisconnectTimerId = setTimeout( "onPreAutoDisconnect()", iPreAutoDisconnectSessionTimeout ); + } + iAutoDisconnectTimerId = setTimeout( "onAutoDisconnect()", iAutoDisconnectSessionTimeout ); + + // + // Set bAsyncPageRequestSucceeded and bIsUserActive flags to false. + // + bAsyncPageRequestSucceeded = false; + bIsUserActive = false; + + return; + } +} + +function onPreAutoDisconnect() +{ + // + // If user has not made any activity, + // reset onPreAutoDisconnect for the remaining time. + // + if ( bIsUserActive != true ) + { + // + // Calculate User Acivity Window and call into workspace runtime asking to update the timeout. + // + var objCurrentTime = new Date(); + var iRemainingAutoDisconnectSessionTimeout = iAutoDisconnectSessionTimeout - (objCurrentTime.getTime() - objPageLoadTime.getTime()); + iRemainingAutoDisconnectSessionTimeout = (iConstPreAutoDisconnectFactor * iRemainingAutoDisconnectSessionTimeout); + + // + // Reset AutoDisconnect timers. + // + clearPreAutoDisconnectTimer(); + if ( iRemainingAutoDisconnectSessionTimeout > iConstPreAutoDisconnectThreshold ) + { + iPreAutoDisconnectTimerId = setTimeout( "onPreAutoDisconnect()", iRemainingAutoDisconnectSessionTimeout ); + } + return; + } + + // + // Turn off the flags. + // + bAsyncPageRequestSucceeded = false; + + // + // Send a background async request to the server to refresh the tick. + // Not using window.location.reload as that refreshes the page in browser leading to bad UX. + // + objXmlHttp = getXmlHttpObject(); + if ( objXmlHttp == null ) + { + return; // browser does not support XMLHTTP - fail silently + } + + objXmlHttp.onreadystatechange = onXmlHttpRequestStateChanged; + objXmlHttp.open( "GET", window.location, true); + objXmlHttp.send( null ); +} + +function onUserActivity( objEvent ) +{ + objLastUserActivityTime = new Date(); + if ( bIsUserActive != true ) + { + bIsUserActive = true; + } +} diff --git a/RDSFactorWeb/RDWeb/Pages/tswf.xsd b/RDSFactorWeb/RDWeb/Pages/tswf.xsd new file mode 100644 index 0000000..79c6239 --- /dev/null +++ b/RDSFactorWeb/RDWeb/Pages/tswf.xsd @@ -0,0 +1,181 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/RDSFactorWeb/RDWeb/Pages/webscripts-domain.js b/RDSFactorWeb/RDWeb/Pages/webscripts-domain.js new file mode 100644 index 0000000..da87f40 --- /dev/null +++ b/RDSFactorWeb/RDWeb/Pages/webscripts-domain.js @@ -0,0 +1,180 @@ + +function onLoginFormSubmit() +{ + var bStopSubmission = false; + var iErrorCode; + var objForm = document.getElementById("FrmLogin"); + var strDomainName = null; + var strDomainUserName = ""; + var strPassword = ""; + var strWorkspaceId = ""; + var strWorkspaceFriendlyName = ""; + var strRedirectorName = ""; + var strRDPCertificates = ""; + var bPrivateMode = document.getElementById("rdoPrvt").checked; + var strTimeout = "0"; + + hideElement(document.getElementById("trErrorWorkSpaceInUse")); + hideElement(document.getElementById("trErrorWorkSpaceDisconnected")); + hideElement(document.getElementById("trErrorIncorrectCredentials")); + hideElement(document.getElementById("trErrorDomainNameMissing")); + hideElement(document.getElementById("trErrorUnauthorizedAccess")); + hideElement(document.getElementById("trErrorServerConfigChanged")); + + if ( objForm != null ) + { + strDomainUserName = objForm.elements["DomainUserName"].value; + strPassword = objForm.elements["UserPass"].value; + strWorkspaceId = objForm.elements["WorkSpaceID"].value; + strRDPCertificates = objForm.elements["RDPCertificates"].value; + strWorkspaceFriendlyName = objForm.elements["WorkspaceFriendlyName"].value; + strRedirectorName = objForm.elements["RedirectorName"].value; + + if( bPrivateMode ) + { + strTimeout = objForm.elements["PrivateModeTimeout"].value; + } + else + { + strTimeout = objForm.elements["PublicModeTimeout"].value; + } + + if ( -1 != strDomainUserName.indexOf("\\") ) + { + strDomainName = strDomainUserName.substring( 0, strDomainUserName.indexOf("\\") ); + } + else if ( -1 != strDomainUserName.indexOf("@") ) + { + strDomainName = strDomainUserName.substring( strDomainUserName.indexOf("@") + 1, strDomainUserName.length ); + } + + } + + if ( strDomainUserName == null || strDomainUserName == "" || + strPassword == null || strPassword == "" ) + { + showElement(document.getElementById("trErrorIncorrectCredentials")); + bStopSubmission = true; + } + else if ( strDomainName == null || strDomainName == "" || strDomainName == "." ) + { + showElement(document.getElementById("trErrorDomainNameMissing")); + bStopSubmission = true; + } + else + { + if (strWorkspaceId != null && + strWorkspaceId != "" && + GetActiveXSSOMode()) + { + try + { + var iWorkspaceVersion = GetWorkspaceObjectVersion(); + var objWorkspace = GetWorkspaceObject(); + + if (iWorkspaceVersion >= 2) + { + objWorkspace.StartWorkspaceEx( + strWorkspaceId, + strWorkspaceFriendlyName, + strRedirectorName, + strDomainUserName, + strPassword, + strRDPCertificates, + parseInt(strTimeout), + 0 ); + } + else + { + objWorkspace.StartWorkspace( + strWorkspaceId, + strDomainUserName, + strPassword, + strRDPCertificates, + parseInt(strTimeout), + 0); + } + } + catch (objException) + { + iErrorCode = (objException.number & 0xFFFF); + + // + // 183 = ERROR_ALREADY_EXISTS. + // + if ( iErrorCode == 183 ) + { + showElement(document.getElementById("trErrorWorkSpaceInUse")); + bStopSubmission = true; + } + } + } + } + + // return false to stop form submission + return !bStopSubmission; +} + +function onLoginPageLoad(e) +{ + var strDomainUserName = ""; // CrumbName: Name + var strMachineType = ""; // CrumbName: MachineType + var strWorkSpaceID = ""; // CrumbName: WorkSpaceID + var strCookieContents = ""; + var iIndex; + var bActiveXSSOMode = GetActiveXSSOMode(); // as a side-effect, this caches the workspace ActiveX object + + onPageload(e); // call the parent event + + document.getElementById("tableLoginForm").style.display = ""; + document.getElementById("tdDomainUserNameLabel").style.display = ""; + + if (bActiveXSSOMode) { + + document.getElementById("tablePublicOption").style.display = ""; + document.getElementById("tablePrivateOption").style.display = ""; + document.getElementById("spanToggleSecExplanation").style.display = ""; + document.getElementById("rdoPblc").checked = true; + } + else { + + document.getElementById("trPrvtWrnNoAx").style.display = ""; + } + onClickSecurity(); + + strCookieContents = getCookieContents(strTSWACookieName); + + if ( null != strCookieContents ) + { + strDomainUserName = decodeURIComponent( getCookieCrumbValue(strCookieContents, "Name") ); + strMachineType = getCookieCrumbValue(strCookieContents, "MachineType"); + strWorkSpaceID = decodeURIComponent( getCookieCrumbValue(strCookieContents, "WorkSpaceID") ); + + if ( strMachineType != "" && + strMachineType == "private") + { + document.getElementById("DomainUserName").value = strDomainUserName; + document.getElementById("rdoPrvt").checked = "private"; + onClickSecurity(); + } + + // + // Set focus on UserName or Password field. + // + if ( strDomainUserName != "" ) + { + document.getElementById("UserPass").focus(); + } + else + { + document.getElementById("DomainUserName").focus(); + } + } + else + { + document.getElementById("DomainUserName").focus(); + } + + +} +