CloudGateway: Citrix StoreFront and Receiver Enterprise - what’s happened with pre-launch apps?
Pre-launch apps and Citrix Web Interface PNAgent-site
Since XenApp 6.5 we often use a cool feature called pre-launch apps. Pre-launch apps are configured in Citrix AppCenter and start automatically in the moment a user authenticated with Citrix Receiver Enterprise against a Citrix Web Interface PNAgent-site.
The prelaunch app is not a classic published app. These apps run in background and start over if the user clicks a regular app (using session sharing). The advantage: The preparation of a session results in a better user experience.
Pre-launch apps and Citrix StoreFront
A colleague of mine told me, that he had some problems using Receiver Enterprise with StoreFront (setup version 126.96.36.199) and configured legacy support. In his case the Receiver worked like a legacy ICA-Client (PNAgent) but the pre-launch app didn’t start. A research with Google underlined my suspicion that there is a general problem.
Receiver Enterprise Communication with Citrix Web Interface PNAgent-site
To find out where the differences – using Web Interface or StoreFront – are, I installed both on a server and monitored the communication. For an easy monitoring I configured IIS, Web Interface and StoreFront to use http (instead of https) and I installed Fiddler4 (http://www.fiddler2.com/fiddler2/version.asp) – a very good web monitoring tool.
To change the configuration in Receiver Enterprise click right in the tray – info – advanced – online plug-in settings – change server. First I changed it to use Web Interface PNAgent-site (http://srv-world-060.world.local/Citrix/SSite/config.xml).
Communication in detail:
5: Receiver Enterprise reads configuration of the Web Interface PNAgent-site
6: Receiver Enterprise asks for pre-launch apps (the tag >$PRELAUNCH$< is in the request body of Receiver Enterprise)
7: Receiver Enterprise asks for a list of all application for the user
8: Receiver Enterprise tries to connect disconnected sessions
9: Receiver Enterprise gets the information of the pre-launch-marked app
10: Receiver Enterprise starts the pre-launch app (launch.aspx generates the ica launch-file)
Summary: After authentication the pre-launch-marked app starts – all fine.
Receiver Enterprise Communication with StoreFront and configured legacy mode
The same test against StoreFront (http://receiver.world.local/Citrix/World/PNAgent/config.xml) with legacy support results in this:
Communication in detail:
3: Receiver Enterprise reads configuration of the StoreFront with legacy mode configured
4: Receiver Enterprise asks for pre-launch apps (the tag >$PRELAUNCH$< is in the request body of Receiver Enterprise)
5: Receiver Enterprise asks for a list of all application for the user
Summary: The pre-launch-marked app doesn’t start
The difference between the communication
I take a deeper look into the first communication with enum.aspx. In both cases the first communication asked for pre-launch apps and the request body of Receiver Enterprise is the same (here’s a part of it):
But what I get back from Web Interface and StoreFront is different. Here are parts of both answers of enum.aspx:
I found out that StoreFront didn’t use readable names in <InName>. But this is not the important difference. The difference – which caused in the malfunction of starting pre-launch apps – is the missing parameter $PRELAUNCH$ in the <Scope> tag. I think this is an error in this StoreFront Version.
A workaround to get pre-launch apps working
To get a workaround and to test my presumption that it will work with the missing parameter $PRELAUNCH$ I tried to fix the XML answer in an aspx file. Believe me, it took hours to find an easy way to fix or workaround this in StoreFont script. But unfortunately StoreFront is based more on DLLs instead of aspx-files (the good old time … ;-).
Therefore I wrote a short script which replaces the (virtual) enum.aspx-file on StoreFront (for sure, this is not supported by Citrix and more a technical proof). This new script interacts as an XML proxy on the StoreFront server and forwards the request from the Receiver Enterprise to the original enum.aspx (which I renamed). In a case where the pre-launch information is (wrong) provided by StoreFront, my script replaces the wrong part with the correct part (includes the missing $PRELAUNCH$ parameter).
Install the “new” enum.aspx (experimental)
First I changed the virtual enum.aspx of StoreFront to enum_org.aspx. In c:\inetpub\wwwroot\Citrix\<Storename>\web.config I change the line:
<route name="pnaEnum" url="PNAgent/enum.aspx">
<route name="pnaEnum" url="PNAgent/enum_org.aspx">
In addition: To prevent StoreFront to send the path of enum_org.aspx to the Receiver it's also necessary to change the file C:\inetpub\wwwroot\Citrix\<Storename>\Views\PnaConfig\config.apx, line 34:
<Location replaceServerLocation="true"><%= ViewData["PNA.Explicit.Enumerate.url"]%></Location>
<Location replaceServerLocation="true"><%= ViewData["PNA.Explicit.Enumerate.url"].ToString().Replace("_org","")%></Location>
Secondly I put the real (experimental) script enum.aspx to c:\inetpub\wwwroot\Citrix\<Storename>\PNAgent (create the folder PNAgent).
Maybe you need to edit line 13 of enum.aspx. In line 13 is the web-path to the original enum_org.aspx computed by the request. In some case it is easier to use localhost/Citrix/<Store>/PNagent/enum_org.aspx (especially if Receiver uses an external DNS-Name which differs from the internal name).
After implementing this “XML proxy” I can use the Citrix Receiver Enterprise as expected with StoreFront – including pre-launch apps.
I know that this workaround is not supported. It’s more a technical proof of concept and I think/hope that the failure in StoreFront (the missing $PRELAUNCH$ in the XML answer) will be corrected by Citrix.
I also know that Receiver Enterprise will be a relict and will be replaced by the “cool and well-looking” Receiver. On my wish-list for the next receiver, I put pre-launch apps on the first third.
PS: If you have prepared your IIS with hints out of my blog https://www.sepago.de/marcel/2012/09/28/removing-unnecessary-iis-handler-mapping-to-secure-citrix-webinterface-on-iis be sure to enable the 64 bit handler for aspx-files (on Windows Server 2012 with StoreFront x64).
I'm not responsible for any content on this site or linked sites
Citrix Receiver Enterprise 3.3 (called Receiver for Windows 3.3 (Legacy PNA), released 07/31/2012)
Fiddler - Web Debugging Proxy
Citrix support: How to Configure Application Pre-Launch in XenApp 6.5