Client To Server Content Redirection Explained


Introduction


In Citrix Metaframe XP Feature Release 2 Citrix introduced content redirection. Content redirection can be divided in two parts.



  • Server to Client content redirection; this makes it possible to start URLs locally on the client PC. Embedded URLs are intercepted on the server running Presentation Server and sent to the client. The user’s locally installed browser is used to display the website.
  • Client to Server content redirection; when a user double-clicks a file the corresponding application is started on the Citrix server.

This article will describe in detail the latter, Client to Server content redirection. First I will describe the requirements, followed by the standard configuration of Client to Server Redirection. Also this article will contain a paragraph about troubleshooting, and last but not least I will describe a solution that will allow you to tweak Client to Server redirection.


Requirements


As mentioned, since Metaframe XP Feature Release 2 (FR2) content redirection is available within the Presentation server suite and has not changed much in the meantime. So everything explained in this document applies to all versions from the Metaframe XP FR2 till Citrix Presentation Server 4.


To use Client To Server redirection you are limited to some components and requirements, which I will describe this in this section.


Citrix Program Neighborhood


Before you can use client to server redirection you need to make a design decision.


Client to Server redirection is only available when using the Citrix Program Neighborhood Agent (PNAgent). Using the PNAgent can change the way users are used to starting their applications, if you are already using Citrix. Also, using PNAgent has one big requirement:


Web Interface


This requirement is Citrix Web Interface. Citrix PNAgent connects to the Web Interface to query which applications are available for the user and which file associations are available. Web Interface runs on a Microsoft Internet Information Server, so you need at least one server. For fault tolerance, load balancing, and avoiding a Single Point of Failure (SPOF) you should think about using two Web Interface servers.


Advanced or Enterprise version


Client to Server redirection is not available in all versions. Only the Advanced and Enterprise version have the Client to Server redirection feature available.


Client Drive Mapping


Client Drive Mapping is the last requirement for Client to Server Redirection. Without mapped client drives the feature does not function, so client driver mapping needs to be enabled.


Configuration


Configuring Client to Server redirection is actually pretty easy normally. You need to configure your Web Interface Server and install and configure the Citrix PNAgent as normal. When publishing an application you can choose the file extensions you want to associate to that application in the last screen during the Publish Application wizard.




Figure 1: Specify a file association to the published application


But sometimes the file extension is not available as a choice in the Citrix Management Console. What can you do then?




Figure 2: No file extensions are available for the published application


Helping the Citrix Management Console


Of course you would like to associate that extension to your Published Applications.


The first step you could do is refreshing (or actually updating) the Citrix Management Console via right-clicking on the Farm properties and choosing Update File Types from registry. Choose (one of the) server(s) on which you installed the application in the wizard. After a few minutes the file extension should be available in the Citrix Management Console.




Figure 3: Updating the file type within the Citrix Management Console


During this process the Citrix Management Console reads the file associations in the registry for that server. If you would like to use file extensions which are not registered on the server you can arrange the file association yourself.


There are several ways to do this. The easiest one is to add the file association manually on the server(s). This can be done within Folder Options via the menu option Tool out of Explorer. Add a new File Type, I would advise adding the application via the Advanced button. In this way you have more flexible configuration options. In Figure 4 you can see the file extension .euh which opens with the Notepad application.




Figure 4: Adding manually a file extension on the server


Other ways to achieve the same result can be done via the assoc command or as described in the Microsoft Knowledgebase article. After Updating File Types from registry option in the Citrix Management Console you can add the file extension to the Published Application.


But sometimes the above mentioned workaround to add your file association cannot be used. An example is when you need to start additional scripts or commands before the application starts and you worked this out by publishing a batch file with these commands followed by starting the application. Another example is if you are using a third party product like Powerfuse which publishes the application with their executable, it is not possible or easy to arrange the file association on the servers. A third example is if you are using the same server for publishing a desktop and don’t want the file association for users which are accessing the application within the desktop session.


Creating Client to Server Redirection on your own


Because you cannot set the file association in this way via the Citrix Management Console, we should find another solution. The most obvious way to accomplish this is by trying to set these settings on the client PC. Normally workstations with PNAgent configured are managed systems so there are some possibilities.


Actually you can add these file associations the same way Citrix does this for the applications. Citrix stores the file associations in the HKEY_CURRENT_USER key under Software\Classes in a straight-forward method. Adding within the [HKCU] key is a good method since you have the possibility of adding file associations on a group or user base without conflicting those settings (different users need the same file association for a different application).


First you need to create the configuration for redirecting the file to a published application. Therefore a new key needs to be created in the [HKCU]\Software\Classes. I will follow the same convention as Citrix does, so I will use the following convention <FILEEXT>FILE.CTX, for example MPPFILE.ctx.


Within this key the following keys need to be created as displayed in Figure 5.




Figure 5: Overview of the registry file assocation


Within the DefaultIcon key the default value will be filled with data where to find the icon. Citrix normally uses the PNAgent cache, so I would advise using that cache also.


This cache is normally stored in C:\Document and Settings\%username%\Application Data\Citrix\PnAgent\Appcache\<APPLICATION NAME>.ico.


The application name is the value which is specified as Application Name in the Published Applications properties. In Figure 6 this property is outlined in red.




Figure 6: This is the property that needs to be filled in the several values


Within the [HKCU\Software\Classes\<FILEXT>FILE.CTX\shell\open command also the default value needs to be configured. This data points to the application that needs to be started. Here we are using the PNAgent executable with parameters /launch followed by the application name and /param:\\Client\%1. Figure 7 shows an example of Microsoft Project published using RES Powerfuse.




Figure 7: Examples of the two keys. Above the DefaultIconCache, below the Command data


To activate the created file association you need to specify which file extension(s) should use this file association. Therefore also in [HKCU]\Software\Classes a new key should be created for the file extensions. In this example this would be .MPP. In the default value we fill the keyname <FILEEXT>FILE.ctx, so MPPFILE.ctx. If you want to associate another file extension just add this one also within this key with the data in the value pointing to <FILEEXT>FILE.ctx, for example for .MPT.


Our example configuration would be as displayed in Figure 8.








Windows Registry Editor Version 5.00


[HKEY_CURRENT_USER\Software\Classes\MPPFILE.ctx]


[HKEY_CURRENT_USER\Software\Classes\MPPFILE.ctx\DefaultIcon]


@=”C:\\Documents and Settings\\%username%\\Application Data\\Citrix\\PNAgent\\AppCache\\Microsoft Proje – My_Applications {47}.ico,0″


[HKEY_CURRENT_USER\Software\Classes\MPPFILE.ctx\shell]


[HKEY_CURRENT_USER\Software\Classes\MPPFILE.ctx\shell\open]


[HKEY_CURRENT_USER\Software\Classes\MPPFILE.ctx\shell\open\command]


@=”\”C:\\Program Files\\Citrix\\ICA Client\\pnagent.exe\” /launch <Microsoft Proje – My_Applications {47}> /param:\”\\\\Client\\%1\””


[HKEY_CURRENT_USER\Software\Classes\.mpp]


@=”MPPFILE.ctx”


[HKEY_CURRENT_USER\Software\Classes\.mpt]


@=”MPPFILE.ctx”

Figure 8: The complete configuration for Microsoft Project (via RES Powerfuse) including two file extensions.


Of course this configuration can be added with more file extensions for more published applications.


The last step is to distribute the configuration to the client with the PNAgent on it. This can be done via a registry (exported) file or your own (VB)script and import those via a distribution software product, login script or GPOs.


Conclusion


In this article I described how Client to Server redirection works, which requirements need to be filled in and in which way you configure this options and how to update the Citrix Management Console with file types. The second part of this article described how you can add file associations manually using two methods. The first method is adding file associations on the server, the second method adds the file associations on the client if for described reasons method one can not suit your needs.

About The Author

Leave a Comment

Your email address will not be published. Required fields are marked *

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Scroll to Top