Speeding up the new StoreFront 1.2 (CloudGateway Express)

StoreFront 1.2 was just released on 07.31.12.  After reading it’s benefits, I figure I set it up for a POC and see how it behaves with a new XenApp 6.5 environment.  You can read on the benefits here.  The one thing I noticed, it is extra slow.

The first change comes from the Citrix Forums which dictates to disable NetBIOS over TCP/IP. To disable NetBIOS over TCP/IP, open the Advanced Properties dialog for TCP/IP on each network interface as shown in the screenshot.


Apparently, the need for NetBIOS communication is a prime contributor to the slow enumeration events. Once I made this change the enumerations were lightning fast, but the initial logon page was still slow to load.

In the old days, the sloooow logon page loading was caused by the .NET Framework not  staying resident in memory; however, with Web Interface 5.4 and IIS 7, the Idle Time Out value on the Web Interface App Pool is set correctly to 0 by default, which keeps the .NET Framework loaded. So I went looking for another solution.

I found the answer at Alexander Ervik Johnsen’s website. (Later I discovered it is also a Citrix KB article.) I made the following changes on both the Microsoft.NET\Framework and Microsoft.NET\Framework64 directories:

  1. Check in IIS for the ASP.net version that is in use with the Web Interface application pool, which should be version 2.0.50727
  2. Edit the ASPNET.CONFIG file(C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet.config)
  3. Add the following GeneratePublisherEvidence line to the runtime section of the ASPNET.CONFIG file as shown
    <generatePublisherEvidence enabled=”false”/>
  4. Run IISRESET for force a reread of the ASPNET.CONFIG file

Once I made those changes to the ASPNET.CONFIG file, my Web Interface login page loaded in about 3 seconds. I was quite surprised at the difference only those two changes made to the response time of the Web Interface servers.

After making the changes above the darn thing is actually ready for a POC.



How To Brand Citrix Receiver for Web

Since Citrix is officially discontinuing the Citrix Web Interface we have all loved for many years.

It seems the focus now will be on the NetScaler Web Portals and of course the new CloudGateway.  I was able to find a good article that explains how to customize the new interface.  Thanks for the Citrix fellas for putting this out.

There have been numerous requests asking how to brand Citrix Receiver for Web.  You have only to look at the Citrix Service Providers group on LinkedIn to know that this is a topic that has generated lots of interest.

Jeroen Tielen has already done a lot of the heavy lifting when it comes to branding Citrix Receiver for the Web — see his blog post on how to customize the branding: http://www.jeroentielen.nl/customizing-the-cloud-gateway-logon-screen/

I’m providing a step-by-step guide on how to do this, and also how to extend it.  CSPs have also said they want to provide a list of URL links, for example links to helpdesk/support sites, feedback mechanisms, etc…

In other words, let’s start with this:

The “Before” web site

And end up with something like this:

The “After” web site

Branding the Web Interface:

Let’s start by creating a new Storefront site for a white label reseller.  This also isolates all of our changes to just this new site, and so we can always revert back to the default Citrix branding.

  1. Run the Citrix XenApp Server Role Manager and then click on the Edit Configuration link for the Receiver Storefront.  This will start the MMC snap-in for Citrix Receiver Storefront.
  2. In the left-hand tree view click on Receiver for Web, and then in the far right-hand pane click on Create Website.
  3. Change the web site path to whatever you want as the URL path for your reseller.  In the screenshot above you can see I chose “/Citrix/TenantACME”.

Now that we have a new web site created, let’s take a quick look.  If you’re using a default environment you’ll see that it created a new folder at C:\inetpub\wwwroot\Citrix\TenantACME, and that within this folder there is a \css folder, a \media folder, a \scripts folder, and a \uiareas folder.  These seem promising!

Let’s start with the background.  If you’ve already read Jeroen’s blog post you’ll know the file we want to change is at C:\inetpub\wwwroot\Citrix\TenantACME\media\bg_bubbles.jpg.  Just replace that file with a different JPG image with the same name.  Here’s an example:

Citrix Receiver for Web - New Background with white text

Not bad, but the white text is a little hard to read.  We’ll start with the username/password and change that to black.

Open up C:\inetpub\wwwroot\Citrix\TenantACME\css\Default.htm.style.min.css in a text editor like Notepad, and do a search for “#logonbox-logonform label” (it will be near the end).  You’ll find a section of text that looks something like this:

#logonbox-logonform label{color:white;display:table-cell;font-size:12px;height:20px;vertical-align:bottom;}

All you have to do is change the part the highlighted text from “white” to “black”:

#logonbox-logonform label{color:black;display:table-cell;font-size:12px;height:20px;vertical-align:bottom;}

While you’re in that file you’ll also want to change some other things as well.  For example any messages will also be in white.  So search for “.ctxsui-messagebox{height:142px” (near the top) and change the color to black as well:


The Citrix Receiver logo is also really hard to read since it’s white.  That’s an image, so all we have to do is replace C:\inetpub\wwwroot\Citrix\TenantACME\uiareas\Authentication\media\logo_notagline.png with a different image, just like we did for the background image.  We’ll also change the “Screen_SemiTranslucent.png” image (the light bar going across the middle) and the “VerticalGreenBarOnly.png” image (the vertical bar on the far left) as well, since our background has more of a blue theme.

Our web site now looks like this:

Citrix Receiver for Web - new background with black text

This looks a lot nicer!  You can see that we branded it for the reseller with the “Provided by ACME” tagline in the logo image.  So far though we haven’t really introduced anything new.  All we’ve done is tweak some images and some minor CSS.  Now let’s tackle the fun stuff: adding links!

Adding Links on the Login Page

Before we jump in, let’s take a quick look at how the page is structured. If you’re using IE or Chrome hit the F12 key to follow along. The web page is structured as a series of nested tags. These divide the page into logical sections. It’s laid out like this:

Citrix Receiver - DOM model

You can see the major Divs, and the one that is of interest to us is “authentication”. This is the only Div that is visible initially (the others are set to “display:none”).  The way this page works is that it toggles these Divs on or off – for instance after you login the “authentication” Div will become hidden and the “resources” Div will become visible.

You can see that the “authentication” Div is further comprised of other Divs. What we’re going to do is insert yet another Div into the “authentication” Div. So our code will be visible only when the authentication screen is shown, and hidden otherwise.

Create a new text file called “HelpLinks.js” in your C:\inetpub\wwwroot\Citrix\TenantACME\scripts folder.  We’re going to add our javascript code in its own file so that we can keep it isolated from the main code.  In this file copy-and-paste all of the following:

var SetLinks = function() {
    var content = '\
        <div style="position:fixed; top:500px; left:20px;"> \
            <a href="http://www.helpdesk.com">HelpDesk</a><br /> \
            <a href="http://www.feedback.com">Feedback</a> \
    var newDiv = $(content);

What this does is add some HTML (the part that is highlighted) right after the “#logonbelt-bottomshadow” Div in our page.  It needn’t be exactly there, but the important thing is that our new Div is added somewhere inside of the “authentication” Div.

But so far this code isn’t linked up to anything.  Let’s open C:\inetpub\wwwroot\Citrix\TenantACME\Default.htm in a text editor like Notepad and add a reference to our new Javascript file.  Find this line in the html page (near the top):

<script src="scripts/Default.htm.script.min.js" type="text/javascript"></script>

Now add another line right before it:

<script src="scripts/HelpLinks.js" type="text/javascript"></script>

This references our new javascript, but doesn’t invoke it.  To do that we modify the C:\inetpub\wwwroot\Citrix\TenantACME\scripts\Default.htm.script.min.js file in Notepad.  Search for the following:


Now modify this so that it looks like this:


Let’s take a look now.

Citrix Receiver for Web - New background with links

Nice!  Let’s see what has changed in the structure of our page.

Citrix Receiver for Web - DOM model with new Div

You’ll notice that our new Div was added right after the “logonbelt-bottomshadow” Div.

The rest is just a matter of polish.  Some things that you might want to do.

  1. Our helpdesk and feedback links look a little naked.  You can modify the HTML in HelpLinks.js to decorate those links with some images (as in the “After” image at the top of this article).
  2. After the user logs in and sees the apps you will notice that the white text on a light background can be a little hard to read.  To update the text color search for “#resources-header #header-userinfo{float:left;”, “#resources-header #header-logofflink{float:left;”, and “.myapps-name{padding-top:6px;” in the Default.htm.style.min.css file and update each of them to a darker color.
  3. The background frame around each of the apps likewise might need a little tweaking due to the light background.  Update the image at C:\inetpub\wwwroot\Citrix\TenantACME\uiareas\Store\media\MainAppIcon_normal.png if you want to change it.

You may have noticed that generally you’ll have an easier time if you stick with a dark background.  Also, depending on your installation and version, some of the file names might be slightly different.  For instance the Citrix logo image might be called “logo_tagline.png” instead of “logo_notagline.png”

What if you don’t want the links on the authentication page, but rather *after* the user logs in?  That can be done using the same principles in this article:

  1. Look at the structure of the web site.
  2. Find where you want to place your new HTML (in a new sub-div within the “resources” Div in our case)
  3. Add some Javascript to insert your new HTML after an existing Div element of the page (inserting after the “resources-footer” Div would work)
  4. Call your Javascript from Default.htm.script.min.js

I’ll leave that as an exercise to the reader.  If you’re having trouble let me know in the comments section, and also maybe an enterprising individual will post their answer!

(Caveat Emptor: None of this is officially supported by Citrix, take it as-is.)
(Thanks go to Scott Novack who also helped with this article.)