Summary
This article describes how to load balance Web Interface with a NetScaler.
Background
When a NetScaler is used to load balance Web Interface, it uses either the Management IP (MIP) address or the Subnet IP (SNIP) address as the source IP address when communicating with Web Interface. Web Interface then sees all users, local or remote, as coming from the same IP. This limits Web Interface’s ability to determine where the client is coming from and which IP address (either local or alternate) to issue when launching an application.
To force Web Interface to see the real client IP address, you must make a modification on both the NetScaler and Web Interface systems. It may be necessary to use a network trace or another network monitoring application to determine the actual source IP address used by the NetScaler when communicating to the back-end servers.
Procedure
On the NetScaler:
The NetScaler allows for the insertion of the real client IP address into an HTTP head when passing traffic to the back-end servers. This is called Client IP insertion. This is typically set on the individual services configured for Web Interface.

In Web Interface:
By default, Web Interface uses an IIS variable called REMOTE_ADDR to make the decision to use either the local IP address of the Presentation Server or the alternate address defined in the Presentation Server. This behavior can be configured to use a different variable using the following procedure on the Web Interface server.
Two files MUST be changed for this to work. You must also know which IP address is being used as the source IP address from the NetScaler when communicating to Web Interface. It is required for the modifications listed below.
Note: Make a backup copy of the files listed below before making any changes.
Modifying the site/serverscripts/include.cs file:
Modifying the site/serverscripts/session.cs file:
More Information
Refer to the NetScaler Installation and Configuration Guide or the Web Interface Administrator’s Guide for further assistance.
Note: Citrix NetScaler product documentation can be accessed from the Citrix Knowledge Center by NetScaler customers who are logged on and have valid NetScaler maintenance agreements