How to Save Web Interface Usernames in a Cookie

In the article titled “How to Enable AutoComplete for Web Interface Logon”, I explained how to enable the AutoComplete functionality of web browsers in order to save usernames and/or passwords for Citrix Web Interface. As the article explained, there are a lot of moving parts to the solution such as web browser settings, Protected Storage, JavaScript workarounds, etc. In this article, I will explain how to accomplish something similar by using cookies to remember the last username entered for Web Interface.

In the article titled “How to Enable AutoComplete for Web Interface Logon”, I explained how to enable the AutoComplete functionality of web browsers in order to save usernames and/or passwords for Citrix Web Interface. As the article explained, there are a lot of moving parts to the solution such as web browser settings, Protected Storage, JavaScript workarounds, etc. In this article, I will explain how to accomplish something similar by using cookies to remember the last username entered for Web Interface.

How it Works (if you do not really care how it works, you can just download the modification at the end of this post)

There are really only two parts to this solution. Part 1 – store the username in a cookie. Part 2 – get the username from the cookie and populate the “user name” field at logon. There is a little Web Interface SDK work to obtain the username, but I will explain what is going on.

 

Part 1 – Storing the Username in a Cookie

There are two steps to accomplish this part.

First, we need to get the username after it is validated by Web Interface. An ideal place to get the authenticated username is applistView.ascx. applistView.ascx is the user control in Web Interface that is responsible for displaying a list of applications a user has access to. So, we know if we got to applistView.ascx in the Web Interface logon/application enumeration process that a username should be available.

Second, we need to store the username in a cookie (this is pretty easy in comparison to getting the username).

Here is the code:

Modify applistView.ascx

Find the following text (around line 10):

<!–#include file=”../serverscripts/include.aspxf”–>

Paste the following right after this line

<%

//----------------------------------------------------------------
// WI mod
//----------------------------------------------------------------

string username = String.Empty;

// Get username
com.citrix.authentication.tokens.AccessToken accessToken = com.citrix.wi.pageutils.Authentication.authGetPrimaryAccessToken(wiContext.getWebAbstraction());
if(accessToken != null)
{
if(accessToken is com.citrix.authentication.tokens.GuestToken)
{
// Guest
username = wiContext.getString("Guest");
}
else
{
username = accessToken.getUserIdentity();
}
}

HttpCookie userCookie = Request.Cookies.Get("WI_username");

if(userCookie == null)
{
// Cookie doesn't exist, so create it
userCookie = new HttpCookie("WI_username");
}
else if(userCookie.Value != username)
{
// Need to update the cookie value
Response.Cookies.Set(Request.Cookies.Get("WI_username"));
}

userCookie.Value = username;
userCookie.Expires = DateTime.Now.AddDays(100);
Response.Cookies.Add(userCookie);	

//----------------------------------------------------------------
// End WI mod
//----------------------------------------------------------------

%>

Code explanation:

First, we need to get an AccessToken (see line 10 above). In the Web Interface object model, an AccessToken “…encapsulates information that may be used for authorization and authentication when a Subject requires access to a resource.” What that means in layman’s terms is an AcessToken basically holds your username, password, domain, identity, etc. (you can actually use the PasswordBasedToken Interface to get the password of a user if you wanted to as described in this article).

After we get the AccessToken, we can test to see if this is an anonymous user or not (an anonymous user would have a GuestToken) on lines 12-23 above. If the token is not a GuestToken, then we know we have an authenticated user. There are currently 3 methods you can use to get the user details from the AccessToken:

  1. getAccountIdentity() – gets an AccountIdentiy object.
  2. getShortUserName() – returns the username as a string. Example – if your user identity was domain\jasonco, getShortUserName() returns “jasonco”.
  3. getUserIdentity() – returns the entire logon identity as a string. Example: domain\username or [email protected] (if using UPN). I chose getUserIdentity() in the code above.

The rest of the code is pretty straight forward – it just creates or updates the cookie named WI_username. You could actually name this cookie anything you wanted.

Part 2 – Retrieving/Populating the Username from the Cookie

This part is quite a bit easier than the first part. All we need to do is to get the cookie, if any, from the previous code and populate the username field on the log on screen. The logon screen code can be found in loginMainForm.inc.

Here is the code:

Modify loginMainForm.inc

Find the following text (around line 106):

<td colspan="2">
    <input type='text' name='<%=Constants.ID_USER%>' id='<%=Constants.ID_USER%>'
        class='loginEntries<%=viewControl.getExplicitDisabled()?" loginEntriesDisabled":""%>'
        maxlength='<%=Constants.LOGIN_ENTRY_MAX_LENGTH%>' <%=viewControl.getExplicitDisabledStr()%>
        tabindex='<%=Constants.TAB_INDEX_FORM%>'

Paste the following right after this text:

<%
//----------------------------------------------------------------
//       WI mod
//---------------------------------------------------------------- 

HttpCookie userCookie = Request.Cookies.Get("WI_username"); 

if(userCookie != null)
{
%>
    value='<%=userCookie.Value %>'
<% 

} 

//----------------------------------------------------------------
//       End WI mod
//----------------------------------------------------------------
%>

Code explanation:

The <input… tag above is the field where you fill in your username in loginMainForm.inc. The code inserted above sets the value of the input tag to whatever was stored in the WI_username cookie (if there was anything stored in the cookie at all).

If you want to implement this in your environment and do not feel like copying and pasting all this code, you can download the modified files below:

download Modification for Web Interface 5.1

Get email alerts for your Citrix PS 4.5 Farm with Project S-Bend

Project S-Bend fills the gap in Citrix Presentation Server 4.5 Configuration Logging by alerting you via email when changes happen in your farm.

Citrix introduced a new feature in Citrix Presentation Server 4.5 called Configuration Logging. Configuration Logging keeps track of every change to every object in your Citrix Presentation Server Farm. This information is kept in a back end database and you have the ability to run reports on these changes via the Report Center in the Access Management Console. For more details on setting up Configuration Logging and running reports, check out this article by Al Solorzano.

I think this is a really cool feature that lets you know who did what and when they did it. But, in order to get this information, you have to run a report from the Report Center in the AMC. Granted, you can automate reports, but it would be nice if there was some mechanism to alert you when a change was made. This is where Project S-Bend Phase I comes in to play. Project S-Bend was originally created as an exercise for my session titled “Digging into Citrix Presentation Server 4.5 Configuration Logging” at BriForum Europe 2007.

Project S-Bend Phase I consists of 3 main parts; an “Alerts” table added to the Configuration Logging database, a SQL trigger, and a Windows Service. Project S-Bend uses these parts to send email alerts whenever a change is written to the Configuration Logging back end database.

download JasonConger.com_SBend.zip

Alerts Table
This is a very simple table that is populated by the SQL trigger.

SQL Trigger
The SQL trigger is added to you Citrix Configuration Logging database and fires any time a change is written to the database. The trigger writes the ID of the change to the Alerts table.

Windows Service
The Windows Service reads the Alerts table populated by the SQL trigger. For each row in the table, the Windows Service sends an email to the specified email address with details concerning the object changed.

How it all works
The process is actually quite simple.

  1. When a change is made in your Citrix Presentation Server 4.5 farm, a log entry is created in the Configuration Logging database.
  2. When the log entry is created, the SQL Trigger fires and writes an entry to the Alerts table.
  3. The Windows Services reads the Alerts table on a configurable timed interval. When the Windows Service encounters unprocessed alerts in the Alerts table, it sends and email with details of what was changed.

Project S-Bend flow

What about Phase II?
I guess it is quite obvious that there is a Phase II in the works since I named this thing Phase I. Actually, Phase II is a provider. “A provider for what?” you may ask. Phase II is a provider for reports. Web Interface for Resource Manager will consume this provider as mentioned in the Web Interface for Resource Manager Roadmap.

Script to Manipulate APPSRV.INI

What happens when you need to make mass changes to APPSRV.INI? Use this script to make changes to your user’s APPSRV.INI file via login script. The script adds or modifies .INI file key/value pairs and sections.

Use this script to make changes to your user’s APPSRV.INI file via login script. The script adds or modifies .INI file key/value pairs and sections.

  Download mod_appsrv script v1.1

The Scenario
So, you have been combing through the various support forums all day long trying to find a solution for an issue. You finally find the solution, but it involves modifying every user’s APPSRV.INI file located on their workstation. One common solution that matches the above scenario has to do with Single Sign On issues with Citrix Web Interface. One of the most recommended solutions is to add the following two lines to the [WFClient] section of APPSRV.INI:

SSOnUserSetting=On
EnableSSOnThruICAFile=On

Reference: http://support.citrix.com/article/ctx368624

The Dilemma
So, you try this and it fixes the issue for the user. What do you do now? Manually modify each user’s APPSRV.INI? Tell your users to perform the modification themselves? Script the change? Tell your boss there is no fix for the issue?

The Solution
Script the change sounds good to me, but how do you do that? That is where this article comes in. I mentioned I had a script to manipulate APPSRV.INI in the comments of this article. I have received many emails requesting the script. So, I decided to “spruce up” the script a little by adding more comments and logging and then share it. The script is written in such a way that you can add or modify any key/value pair to any section in APPSRV.INI (or any .INI file for that matter). Just modify the following section of the script to suit your needs:

'**********************************************************
' Add/modify key/value pairs
' modINISection takes 3 parameters:
'    Section name
'    Key
'    Value
'**********************************************************
modINISection "WFClient", "SSOnUserSetting", "On"
modINISection "WFClient", "EnableSSOnThruICAFile", "On"

The above example shows how to implement the solution to the delimma discussed earlier.

Here is another useful one to add that addresses clipboard issues:

modINISection "WFClient", "CbChainInterval", "2000"

From the Citrix Client 9.100 Readme http://support.citrix.com/article/CTX107650

“This fix introduces support for a mechanism to check at periodic intervals the client’s ability to receive clipboard change notifications. If the mechanism finds the client to be unable to receive such notifications, the client will attempt to register itself to receive future notifications. To enable this functionality, you must modify users’ appsrv.ini files as follows: 1. Open the appsrv.ini file located in the user profile directory using a text editor. 2. In the WFClient section, locate or add the entry: CbChainInterval=<value>, where value is the interval, in milliseconds, at which checks are to be performed. Supported values range from 0 to 2,000, inclusive.”

Think of it as an auto RepairCDBChain.exe

Some quick things to note about the script:

  • If you specify a section for modINISection that does not exist, the section will be created.
  • If you specify a key that does not exist, the key will be created at the end of the section.
  • Curretnly, there is no implementation to delete key/value pairs (I’m not sure that would even be useful for the intended usage)
  • A log file is created in the same directory as the APPSRV.INI file. The log file is named the same as the script name. If you change the script name to match you company’s naming convetion, the log file name will change automatically.

Good luck and have fun. But, as always, test test test. Make sure this script works in your environment before you throw it out there on your global login script.

Project Mobius Beta 2.1

Migrating or maintaining multiple Citrix farms? Project Mobius is a Microsoft Windows application that allows you to drag and drop published applications and/or folders from one Citrix Presentation Server farm to one or more separate Citrix Presentation Server farms.

Project Mobius Beta 2.1 includes some visual enhancements as well as some bug fixes. The main bug fixed in Project Mobius Beta 2.1 addresses an issue when migrating applications from a Citrix MetaFrame XP farm to a Citrix Presentation Server 3.0 or above farm. You may receive an error that states:

Failed to copy published application ({App_Name}).

Details: Unable to cast COM object of type ‘System.__ComObject’ to interface type ‘MetaFrameCom.IMetaFrameApplication4′, This operation failed because the QueryInterface call on the COM component for the interface with IID'{ED62F58D-63C2-11D4-94D8-00C04FB0F326}’ failed due to the following error: no such interface supported (Exception from HRESULT: 0x80004002 {E_NOINTERFACE)).

This issue has been resolved in the latest code.

  Download Project Mobius Beta 2.1

While we’re on the topic of Project Mobius, let me quickly address Project Mobius Beta 3. Project Mobius Beta 3 will include a “best effort” policy migration. What does a “best effort” policy migration mean you may ask? To explain this, I first need to tell you about my adventures with policies in MFCOM. Let’s just say that the stability of policy manipulation in MFCOM is, um, less that 100%. I consistently received errors on certain methods when trying to manipulate polices programmatically that, according to the documentation, should have worked. That being said, I almost scrapped Beta 3 of Project Mobius altogether.

Fast forward to BriForum Europe 2007. I was chatting with Shawn Bass and Thomas Koetzing during a break and relaying my frustration concerning the roadblocks I was running into with programmatically manipulating policies via MFCOM. Then, a suggestion was made to me. Why not migrate everything you can in code. Then, create a report on anything that failed during the process. That way, you can get 85% – 90% of the way there programmatically on the policy settings and only have to do 10% – 15% manually. That sounded good to me, so I resurrected Beta 3 and started to implement this “best effort” policy migration. Look for this in Project Mobius Beta 3.

Project Mobius Beta 2

Migrating or maintaining multiple Citrix farms? Project Mobius is a Microsoft Windows application that allows you to drag and drop published applications and/or folders from one Citrix Presentation Server farm to one or more separate Citrix Presentation Server farms.

One of the most popular ways to migrate from one Citrix Presentation Server farm to a new Citrix Presentation Server farm is to build the farms in parallel and use Web Interface to aggregate the two separate farms’ published applications. This is a great strategy and I have used parallel farms many times in the past to migrate users to a new farm. One of the challenges of this strategy is duplicating published applications and policies from the old farm to the new farm. Traditionally, you would need to either manually create each published application in the new farm or use scripting to export/import published applications. This is where Project Mobius comes in. Project Mobius is a Microsoft Windows application that allows you to drag and drop published applications and/or folders from one Citrix Presentation Server farm to one or more separate Citrix Presentation Server farms. Project Mobius currently only has capabilities to migrate published applications and content, but the capability to migrate policies is slated for a future release.

  Download Project Mobius Beta 2

What’s New in Beta 2?
The following enhancements have been made for Beta 2:

  • Supports migrating published content.
  • Supports migrating content redirection file type associations.
  • Supports migrating nearly all application settings using a “least common denominator” methodology. This means that applications can be migrated upward or downward across Citrix platforms. For instance, a published application can be migrated from a MetaFrame XP farm to a Presentation Server 4.5 farm. Or, vice versa, a published application can be migrated from a Presentation Server 4.5 farm to a MetaFrame XP farm.
  • Numerous visual feedback enhancements.
  • No policy migration yet. I am still working on getting the bugs ironed out of policy migration. I have a lot of the policy migration code written, but it is still a little “less than stable” so I excluded it from the latest build. If you would like to be a tester for Beta 3 (with policy migration), shoot me an email.

* Special thanks goes to David Taig for enhancement suggestions and testing the various builds of Project Mobius.
Project Mobius requires Microsoft .Net Framework version 2.0.

Installation

Project Mobius utilizes MFCOM to perform application migration. Thus, Project Mobius must be run from either a Citrix Presentation Server or a workstation that has the Citrix Presentation Server SDK installed and registered for DCOM (utilizing mfreg.exe).

Project Mobius does not require an install. Simply copy Mobius.exe as well as Interop.MetaFrameCOM.dll to a location on your Presentation Server (or workstation).

Tested Platforms
The MFCOM interfaces and methods used in the source code for Project Mobius should be compatible with Citrix MetaFrame XP 1.0 and above. However, Project Mobius has specifically been tested on the following platforms:

  • Citrix MetaFrame XP FR3 (Microsoft Windows 2000)
  • Citrix Presentation Server 3.0 (Microsoft Windows 2003)
  • Citrix Presentation Server 4.0 (Microsoft Windows 2003)
  • Citrix Presentation Server 4.5 (Microsoft Windows 2003)

Using Project Mobius

Step 1 – Click File -> Connect to Farm. Then, specify any Citrix Presentation/MetaFrame Server in any farm you want to manage.  Project Mobius uses the specified server to enumerate all published applications and folders in a given farm.  Repeat this step for any additional farms you want to manage. (Tip: you may also right click on the Enterprise Farms tree node or click the Connect to Farm icon to connect to a farm.

Connect to Farm
Click to enlarge Click to enlarge


Step 2
– Highlight a folder in the left hand tree view containing the published applications and folders you want to migrate.  Drag and drop the published applications and folders from the right hand side to the appropriate location in any farm on the left hand side. (Tip: you may use Ctrl or Shift to select multiple published applications or folders).

Farm Applications
Click to enlarge Click to enlarge


Optional
– Farms that have a large number of applications may take several minutes to enumerate all published applications.  This is due to the fact that Project Mobius has to use the LoadData() method of the IMetaFrameApplication interface for each published application in order to retrieve the application object and bind the object to the tree view.  This can be time consuming as each call to LoadData retrieves all properties for a published application.  To mitigate this time consuming process, click on Tools -> Options.  Then, select Enable dynamic population.  This option will only load published applications for the selected folder.  Each time you highlight a new folder, Project Mobius will dynamically retrieve the published applications within the folder.

Options
Click to enlarge Click to enlarge

Trivial Information
For those of you still reading and wondering why this piece of software is called Project Mobius, let me explain. Citrix code names Presentation Server after rivers (Hudson = Presentation Server 3.0; Colorado = Presentation Server 4.0; Ohio = Presentation Server 4.5; etc.). I was pondering what to name this project and I decided to name products after wakeboard tricks. One wakeboard trick that has a cool sounding name in my opinion is called a Mobius. A Mobius is a back side roll (flip) with a 360 degree handle pass rotation.  If you want to see what it looks like, check out this video.  So, all in all, this project has no hidden tie in to the wakeboarding Mobius.  I just think it is a cool name (and trick).

Project Mobius Beta 1

Migrating or maintaining multiple Citrix farms? Project Mobius is a Microsoft Windows application that allows you to drag and drop published applications and/or folders from one Citrix Presentation Server farm to one or more separate Citrix Presentation Server farms.

One of the most popular ways to migrate from one Citrix Presentation Server farm to a new Citrix Presentation Server farm is to build the farms in parallel and use Web Interface to aggregate the two separate farms’ published applications. This is a great strategy and I have used parallel farms many times in the past to migrate users to a new farm. One of the challenges of this strategy is duplicating published applications and policies from the old farm to the new farm. Traditionally, you would need to either manually create each published application in the new farm or use scripting to export/import published applications. This is where Project Mobius comes in. Project Mobius is a Microsoft Windows application that allows you to drag and drop published applications and/or folders from one Citrix Presentation Server farm to one or more separate Citrix Presentation Server farms. Project Mobius currently only has capabilities to migrate published applications, but the capability to migrate policies is slated for a future release.

  Download Project Mobius Beta 1

Installation
Project Mobius requires Microsoft .Net Framework version 2.0.

Project Mobius utilizes MFCOM to perform application migration. Thus, Project Mobius must be run from either a Citrix Presentation Server or a workstation that has the Citrix Presentation Server SDK installed and registered for DCOM (utilizing mfreg.exe).

Project Mobius does not require an install. Simply copy Mobius.exe as well as Interop.MetaFrameCOM.dll to a location on your Presentation Server (or workstation).

Tested Platforms
The MFCOM interfaces and methods used in the source code for Project Mobius should be compatible with Citrix MetaFrame XP 1.0 and above. However, Project Mobius has specifically been tested on the following platforms:

  • Citrix MetaFrame XP FR3
  • Citrix Presentation Server 3.0
  • Citrix Presentation Server 4.0
  • Citrix Presentation Server 4.5

Using Project Mobius

Step 1 – Click File -> Connect to Farm. Then, specify any Citrix Presentation/MetaFrame Server in any farm you want to manage.  Project Mobius uses the specified server to enumerate all published applications and folders in a given farm.  Repeat this step for any additional farms you want to manage. (Tip: you may also right click on the Enterprise Farms tree node or click the Connect to Farm icon to connect to a farm.

Connect to Farm
Click to enlarge Click to enlarge


Step 2
– Highlight a folder in the left hand tree view containing the published applications and folders you want to migrate.  Drag and drop the published applications and folders from the right hand side to the appropriate location in any farm on the left hand side. (Tip: you may use Ctrl or Shift to select multiple published applications or folders).

Farm Applications
Click to enlarge Click to enlarge


Optional
– Farms that have a large number of applications may take several minutes to enumerate all published applications.  This is due to the fact that Project Mobius has to use the LoadData() method of the IMetaFrameApplication interface for each published application in order to retrieve the application object and bind the object to the tree view.  This can be time consuming as each call to LoadData retrieves all properties for a published application.  To mitigate this time consuming process, click on Tools -> Options.  Then, select Enable dynamic population.  This option will only load published applications for the selected folder.  Each time you highlight a new folder, Project Mobius will dynamically retrieve the published applications within the folder.

Options
Click to enlarge Click to enlarge

Trivial Information
For those of you still reading and wondering why this piece of software is called Project Mobius, let me explain. Citrix code names Presentation Server after rivers (Hudson = Presentation Server 3.0; Colorado = Presentation Server 4.0; Ohio = Presentation Server 4.5; etc.). I was pondering what to name this project and I decided to name products after wakeboard tricks. One wakeboard trick that has a cool sounding name in my opinion is called a Mobius. A Mobius is a back side roll (flip) with a 360 degree handle pass rotation.  If you want to see what it looks like, check out this video.  So, all in all, this project has no hidden tie in to the wakeboarding Mobius.  I just think it is a cool name (and trick).

Web Interface for Resource Manager 2.2

Got Citrix Resource Manager? Try out Web Interface for Resource Manager! Web Interface for Resource Manager is an ASP.NET 2.0 web application that contains several SQL queries to display useful information contained in the Citrix Resource Manager Summary Database.

version 2.2

UPDATE March 1, 2007 – The resolution to errors received when saving your configuration is posted in the Known Issues section of this article.

Got Citrix Resource Manager?  Try out Web Interface for Resource Manager!

Web Interface for Resource Manager is an ASP.NET 2.0 web application that contains several SQL queries to display useful information contained in the Citrix Resource Manager Summary Database.  Web Interface for Resource Manager displays this information in a drill-down graphical and tabular manner.

What’s new in version 2.2?
Web Interface for Resource Manager version 2.2 includes everything in version 2.1, plus the following new features:

  • New information on the Client report
    • When no client version is stored in the Citrix Resource Manager Summary Database, the Client report performs a lookup based on the build number.  Special thanks goes to Alex Danilychev for creating a Client Build vs. Version chart.
    • The Client report has an icon that will show all workstations that have used a particular client. 
    • When you click on the user icon in the Client report, the workstation the user used to launch the session is displayed in the report.
  • There are 3 new features on the Client report:

  • Microsoft Excel exports on every tabular report
    The ability to export viewed results to Microsoft Excel is now on every report that presents tabular data.
  • Active Directory group security for Configuration options
    The configuration page is now optionally securable by specifying an Active Directory group in the configuration page.
  • Web.Config connection string encryption
    When you enter your database connection details in the configuration page, the resulting connection string that is stored in Web.Config is now encrypted.

 

  • Active Directory group security for Configuration options
    The configuration page is now optionally securable by specifying an Active Directory group in the configuration page.

 

  • French Translation
    Thanks to Laurent FALGUIERE, there is now a French translation of Web Interface for Resource Manager.  Resource Manager for Web Interface is also in German (thanks to Josef Zeiler), Dutch (thanks to Michel Roth), and English.

 

  • Farm name display in page titles
    The name of your farm is now displayed in the title of each page.  This helps keep things straight when you have multiple farms and an instance of Web Interface for Resource Manager for each farm.

Another thanks goes to Michel Roth for creating a Web Interface for Resource Manager Premo.  What is a Premo? “A Thincomputing.net Premo is a crossover between a preview and a demo of a new (version of a) product or technology in the field of Server Based Computing and Virtualization.”  Be sure to check it out…

  Download Web Interface for Resource Manager version 2.2 (for Presentation Server 3.0 and above) 

What’s on the radar for the future?

  • More “higher level” reports – meaning more reports that show entire farm data.  These reports will include drill down capabilities in to some of the more granular existing reports. 

Known issues

Issue
You receive a message stating “In order to modify configuration settings, the ASP.NET process account (either the local ASPNET or Network Service account, by default) must have write permission granted for the Web.config file in the web site directory.”

Resolution
Make sure the NETWORK SERVICE account (or whichever account is configured for the IIS Application pool identity WI RM is in) has write access to the directory where Web.Config resides. This is due to the way the Configuration.Save() method works in the .Net Framework. When this method is called, a temporary config file is created before overwriting the Web.Config file. If the NETWORK SERVICE account does not have write access to the directory, the temporary file cannot be created and you will receive the error message stated above. Also, ensure Web.Config is not a Read Only file.

If all database tables are not owned by dbo, you will receive errors. For more explanation on this phenomenon, see this article.

If you do not properly set up your database authentication, you will not be able to view any reports. Please refer to this article for database authentication guidelines.

Note: Version 2.2 is only intended for Presentation Server 3.0 and above. This is due to the differences in the Resource Manager Summary Database schema.  The MetaFrame XP Summary Database schema does not include the tables necessary to generate these new reports. Please use Web Interface for Resource Manager Version 1.1 for MetaFrame XP.

Screen Shot of Web Interface for Resource Manager’s GUI Configuration Tool


Click to enlarge

Be sure to check out Access Tracking Manager (ATM) from XTS as well. ATM leverages Microsoft SQL Server Analysis Services and OLAP Cubes to provide even more detailed reports for your Citrix environments.

Web Interface for Resource Manager 2.1

Got Citrix Resource Manager? Try out Web Interface for Resource Manager! Web Interface for Resource Manager is an ASP.NET 2.0 web application that contains several SQL queries to display useful information contained in the Citrix Resource Manager Summary Database.

version 2.1

Got Citrix Resource Manager?  Try out Web Interface for Resource Manager!

Web Interface for Resource Manager is an ASP.NET 2.0 web application that contains several SQL queries to display useful information contained in the Citrix Resource Manager Summary Database.  Web Interface for Resource Manager displays this information in a drill-down graphical and tabular manner.

What’s new in version 2.1?
Web Interface for Resource Manager version 2.1 includes everything in version 2.0, plus the following new features:

  • Graphical Configuration Tool
    In the past versions of Web Interface for Resource Manager, you had to manually edit the Web.Config file to set up your database connections and time zone overrides. This new graphical tool allows you to set up your options much like you set up an ODBC connection using Windows.
  • Oracle Support
    Many of you have asked for an Oracle version of Web Interface for Resource Manager. Version 2.1 has Oracle support integrated. Just open the configuration tool, select Oracle as your Database Server Type and supply your TNS Service Name. One thing to note though, you will need to have the Oracle client installed on your web server.
  • Multiple Language Support
    Web Interface for Citrix Resource Manager has been globalized to support more languages. Currently, Web Interface for Resource Manager supports the following languages:
    • US English
    • German (thanks goes to Josef Zeiler for the translation)
    • Dutch (thanks goes to Michel Roth for the translation)

  Download Web Interface for Resource Manager version 2.1 (for Presentation Server 3.0 and above) 

What’s on the radar for the future?

  • Using MFCOM and WMI to move reports beyond the Summary Database.
  • Of course, more reports.

Known issues

If all database tables are not owned by dbo, you will receive errors. For more explanation on this phenomenon, see this article.

If you do not properly set up your database authentication, you will not be able to view any reports. Please refer to this article for database authentication guidelines.

Note: Version 2.1 is only intended for Presentation Server 3.0 and above. This is due to the differences in the Resource Manager Summary Database schema.  The MetaFrame XP Summary Database schema does not include the tables necessary to generate these new reports. Please use Web Interface for Resource Manager Version 1.1 for MetaFrame XP.

Screen Shot of Web Interface for Resource Manager’s GUI Configuration Tool


Click to enlarge

Web Interface for Resource Manager 2.0

Got Citrix Resource Manager? Try out Web Interface for Resource Manager! Web Interface for Resource Manager is an ASP.NET 2.0 web application that contains several SQL queries to display useful information contained in the Citrix Resource Manager Summary Database.

version 2.0

Got Citrix Resource Manager?  Try out Web Interface for Resource Manager!

Web Interface for Resource Manager is an ASP.NET 2.0 web application that contains several SQL queries to display useful information contained in the Citrix Resource Manager Summary Database.  Web Interface for Resource Manager displays this information in a drill-down graphical and tabular manner.

What’s new in version 2.0?
Web Interface for Resource Manager version 2.0 includes everything in version 1.2, plus the following new features:

  • Concurrent usage of applications report
    See the concurrent usage of you applications within a specified date range. Also, this report will show you when the maximum number of concurrent sessions was reached.
  • Server metrics report
    See captured metrics for a particular server on a specified date. Any metrics you capture via the Citrix Presentation Server Console will be reported here.
  • Concurrent usage of servers report
    See how many concurrent sessions you are getting per server within a date range. This report will also show you when this max count was reached. Clicking on a row in this report will take you to the server metrics report for the particular date you reached the max count – showing you how your server was performing under the load.
  • Exporting reports
    You can now export reports to CSV for further analysis using an application such as Microsoft Excel
  • New calendar filtering option
    A new option on the Usage Calendar allows you to view all sessions that started per hour on a given day, or just unique users per hour. For example, if user1 started 2 or more sessions during the 11:00 hour, user1 would only be counted one time.

  Download Web Interface for Resource Manager version 2.0 (for Presentation Server 3.0 and above) 

What’s on the radar for the future?

  • Graphical configuration – no more editing Web.Config by hand.
  • Multiple language support.
  • Oracle Database support.
  • And, of course, more reports.

Known issues

If all database tables are not owned by dbo, you will receive errors. For more explanation on this phenomenon, see this article.

If you do not properly set up your database authentication, you will not be able to view any reports. Please refer to this article for database authentication guidelines.

Note: Version 2.0 is only intended for Presentation Server 3.0 and above. This is due to the differences in the Resource Manager Summary Database schema.  The MetaFrame XP Summary Database schema does not include the tables necessary to generate these new reports. Please use Web Interface for Resource Manager Version 1.1 for MetaFrame XP.

Screen Shots of Web Interface for Resource Manager

New buttons on the Sessions by Hour graph to show all sessions or just unique user sessions
(filters out multiple sessions started by the same user in the same hour).

Click to enlarge

Report showing max concurrent sessions per server and the date this max count was reached.

Click to enlarge

Report showing server metrics for a specified day.

Click to enlarge

MFCOM Script to List Applications Only in Specified Folders

MFCOM Script to List Applications Only in Specified Folders

Here is a quick MFCOM script to list all the published applications and folders in a specified folder or folders. There are two options for using the script. Option one takes any number of command line arguments. Each command line argument represents a folder name. Option two takes no command line arguments and relies on hard-coded folder names within the script.

GetAppsInFolders.zip

Suppose you had the following tree structure for your published applications:

   

Now, say you wanted to run a script that only returned applications in the Testing folder and Microsoft Applications folder. To accomplish this, run the following at a command prompt: 

cscript //Nologo GetAppsInFolders.wsf  “Testing” “Microsoft Applications”

The above command produces the following results:

Note that every folder specified is a child of the “Applications” folder.  To specify a folder that is not a child of the “Applications” folder, you must specify the path relative from “Applications”.  For instance, if you wanted to get only the applications published in the “New Folder” under “Testing”, run the following command:

cscript //Nologo GetAppsInFolders.wsf  “Testing/New Folder”

The above command produces the following results:

To set up the hard-coded folders, open the script in a text editor and look for the following lines (starting around line 31):

    '
    ' If no command line arguments, use hard-coded folders
    '
    if  WScript.Arguments.Count = 0 Then
        ReDim arrFolders(2)
        arrFolders(0) = "Testing"
        arrFolders(1) = "Microsoft Applications"
    Else

Change ReDim arrFolders(2) to ReDim arrFolders(x) where x represents the number of folders you want to hard code.
Next, add arrFolders(n) = “Folder Name” for each folder you want to hard code (where n is a distinct number between 0 and x).

So what is all this good for anyway?  Suppose you wanted to export applications in a few select folders, then import those applications in to a different farm.  This Citrix article demonstrates how to use EXPORT and NEWAPP from the Citrix APSDK.  Using EXPORT and NEWAPP along with GetAppsInFolders.wsf, you can export bulk applications from select specified folders and then import those applications into a different farm.

Web Interface for Resource Manager 1.2

Got Citrix Resource Manager? Try out Web Interface for Resource Manager! Web Interface for Resource Manager is an ASP.NET 2.0 web application that contains several SQL queries to display useful information contained in the Citrix Resource Manager Summary Database.

version 1.2

Got Citrix Resource Manager?  Try out Web Interface for Resource Manager!

Web Interface for Resource Manager is an ASP.NET 2.0 web application that contains several SQL queries to display useful information contained in the Citrix Resource Manager Summary Database.  Web Interface for Resource Manager displays this information in a drill-down graphical and tabular manner.

What’s new in version 1.2?
Web Interface for Resource Manager version 1.2 includes everything in version 1.1, plus the following new features: 

  • Client Usage Report. View every client version that has ever made a connection to your farm.  This report includes a date/time range filter.  You can also drill down to see which users have used particular client versions.
  • Application Report Filters. A date range filter has been added to the Application Report.  Also, the top number of applications is selectable from 1 – 10.  The combination of these two filters allows you to select the top x applications for any given date/time range. 

Web Interface for Resource Manager version 1.2 (for Presentation Server 3.0 and above)

Note: Version 1.2 is only intended for Presentation Server 3.0 and above. This is due to the differences in the Resource Manager Summary Database schema.  The MetaFrame XP Summary Database schema does not include the tables necessary to generate these new reports. Please use Web Interface for Resource Manager Version 1.1 for MetaFrame XP.

Screen Shots of Web Interface for Resource Manager

Usage Calendar (displays number of unique user sessions per day)

Click to enlarge

Bar Chart of sessions started on a particular day

Click to enlarge

Session Details

Click to enlarge

Application Usage

Click to enlarge

Client Usage Report

Click to enlarge

Known Issues

  • You may receive a message stating  Invalid object name ‘table if the owner of a table is anything other than dbo.
    Use the technique described here to change the object owner to dbo.

Please note that this project is a work in progress.  There are several other ideas that are in the works to add to the functionality of this web application.  If you have ideas for further functionality, please let me know in the comments section below.

Citrix Access Gateway AAC 4.2 “SharePoint Look and Feel” Template

This download will help you change your ordinary Citrix Access Gateway with Advanced Access Control Logon Point into a SharePoint looking Logon Point.

This Citrix support article details basic customization of the Advanced Access Control 4.2 Logon Point.  I took this Citrix article and the Citrix Web Interface “SharePoint Look and Feel” Template to come up with a SharePoint look and feel for the Advanced Access Control 4.2 Citrix Access Gateway Logon Point.  Check out the before and after screen shots below:

Before:

Click to enlarge

After:

Click to enlarge

Citrix Access Gateway AAC 4.2 SharePoint Template

Web Interface for Resource Manager 1.1

Got Citrix Resource Manager? Try out Web Interface for Resource Manager! Web Interface for Resource Manager is an ASP.NET 2.0 web application that contains several SQL queries to display useful information contained in the Citrix Resource Manager Summary Database.

version 1.1

Got Citrix Resource Manager?  Try out Web Interface for Resource Manager!

Web Interface for Resource Manager is an ASP.NET 2.0 web application that contains several SQL queries to display useful information contained in the Citrix Resource Manager Summary Database.  Web Interface for Resource Manager displays this information in a drill-down graphical and tabular manner.

What’s new in version 1.1?

  • New application filter on the calendar. You can now filter the calendar page by application, displaying the number of times an individual application has been launched!
  • User level reporting. You can now view a list of every user that has ever accessed your farm and drill down to get session details.
  • Application graph choice. You now have a choice between viewing your top applications via a pie graph or a column chart.

Web Interface for Resource Manager version 1.1 (for Presentation Server 3.0 and above)

Web Interface for Resource Manager XP version 1.1 (for MetaFrame XPe FR3)

Screen Shots of Web Interface for Resource Manager

Usage Calendar (displays number of unique user sessions per day)

Click to enlarge

Bar Chart of sessions started on a particular day

Click to enlarge

Session Details

Click to enlarge

Application Usage

Click to enlarge

User Activity Report

Click to enlarge

Please note that this project is a work in progress.  There are several other ideas that are in the works to add to the functionality of this web application.  If you have ideas for further functionality, please let me know in the comments section below.