<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>JasonSamuel.com &#187; Citrix</title>
	<atom:link href="http://www.jasonsamuel.com/tag/citrix/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.jasonsamuel.com</link>
	<description>Cool stuff I see in the IT world</description>
	<lastBuildDate>Wed, 25 Jan 2012 21:05:04 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=</generator>
		<item>
		<title>How to fix the Error 30105 Citrix servers do not trust the server message in XenDesktop 5.5</title>
		<link>http://www.jasonsamuel.com/2012/01/17/how-to-fix-the-error-30105-citrix-servers-do-not-trust-the-server-message-in-xendesktop-5-5/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=how-to-fix-the-error-30105-citrix-servers-do-not-trust-the-server-message-in-xendesktop-5-5</link>
		<comments>http://www.jasonsamuel.com/2012/01/17/how-to-fix-the-error-30105-citrix-servers-do-not-trust-the-server-message-in-xendesktop-5-5/#comments</comments>
		<pubDate>Tue, 17 Jan 2012 18:29:48 +0000</pubDate>
		<dc:creator>Jason Samuel</dc:creator>
				<category><![CDATA[Citrix XenApp]]></category>
		<category><![CDATA[Citrix XenDesktop]]></category>
		<category><![CDATA[Citrix]]></category>
		<category><![CDATA[xenapp]]></category>
		<category><![CDATA[xendesktop]]></category>
		<category><![CDATA[xml service trust]]></category>

		<guid isPermaLink="false">http://www.jasonsamuel.com/?p=1493</guid>
		<description><![CDATA[When you login to your web interface and launch a new desktop, it might not launch and you might get this error in the application event log on the server: Source: Citrix Web Interface Event ID: 30105&#160;&#160; The Citrix servers do not trust the server. This message was reported from the XML Service at address [...]<p><a href="http://www.jasonsamuel.com/2012/01/17/how-to-fix-the-error-30105-citrix-servers-do-not-trust-the-server-message-in-xendesktop-5-5/">How to fix the Error 30105 Citrix servers do not trust the server message in XenDesktop 5.5</a> is a post from: <a href="http://www.jasonsamuel.com">JasonSamuel.com</a></p>

More of my posts you might like:<ol>
<li><a href='http://www.jasonsamuel.com/2011/11/21/how-to-fix-the-tabctl32-ocx-is-not-registered-error-when-using-the-citrix-quick-launch-tool/' rel='bookmark' title='How to fix the TABCTL32.OCX is not registered error when using the Citrix Quick Launch tool'>How to fix the TABCTL32.OCX is not registered error when using the Citrix Quick Launch tool</a></li>
<li><a href='http://www.jasonsamuel.com/2011/10/26/how-to-force-an-uninstall-of-citrix-xenapp-or-presentation-server-via-command-line/' rel='bookmark' title='How to force an uninstall of Citrix XenApp or Presentation Server via command line'>How to force an uninstall of Citrix XenApp or Presentation Server via command line</a></li>
<li><a href='http://www.jasonsamuel.com/2012/01/05/how-to-fix-pass-through-authentication-the-windows-2008-logon-screen-on-xenapp-6-5web-interface-5-4-using-citrix-receiver/' rel='bookmark' title='How to fix pass-through authentication &amp; the Windows 2008 logon screen on XenApp 6.5/Web Interface 5.4 using Citrix Receiver'>How to fix pass-through authentication &#038; the Windows 2008 logon screen on XenApp 6.5/Web Interface 5.4 using Citrix Receiver</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>When you login to your web interface and launch a new desktop, it might not launch and you might get this error in the application event log on the server:</p>
<p><pre><code>
Source: Citrix Web Interface
Event ID: 30105&nbsp;&nbsp;
The Citrix servers do not trust the server. This message was reported from
the XML Service at address http://localhost/scripts/wpnbr.dll
[com.citrix.xml.NFuseProtocol.RequestAddress].
&nbsp;&nbsp;[Unique Log ID: xxxxxxxx]
</code></pre></p>
<p>In previous versions of Presentation Server, the way to set the XML Trust was to go to your Access Management Console and edit the Properties of the each server.  There would be an &#8220;XML Service&#8221; property near the bottom in the left navigation you could click on.  Check the &#8220;Trust XML requests sent to the XML Service&#8221; box and hit OK.  For the whole farm, open up the farm Properties and go to Farm-wide > XenApp > General and check the &#8220;XML Service DNS address resolution&#8221; check box and hit OK.</p>
<p>In previous versions of XenDesktop, you could go to your DDC and open up the Delivery Services console, right click on the farm properties go to Farm-wide > Desktop Delivery Controller > General and check the &#8220;XML Service DNS address resolution&#8221; and hit OK.</p>
<p>In XenApp 6.0, 6.5, etc. you need to open Delivery Services Console or AppCenter and go to Policies and hit the Computer tab.  Edit the Unfiltered policy and find the XML Service near the bottom in the left hand navigation.  When you click it, you will see &#8220;Trust XML requests&#8221;. Hit Add and set it to &#8220;Enabled&#8221; so the Citrix XML Service will trust requests sent to it and hit OK.  </p>
<p>All this is from memory so if I missed something, let me know.  I don&#8217;t have any consoles in front of me for the different environments at the moment except Desktop Studio or I would post screenshots for you.  Let me know if you need them and I&#8217;ll take some screenshots this evening when I have a bit more time.</p>
<p>And now for the whole reason for this blog post.  In XenDesktop 5.0, 5.5, etc., the Desktop Studio console does not have this option if you look in the Unfiltered policy under HDX Policy.  That&#8217;s a totally different policy.  You have to set the XML Trust via PowerShell now. So to set an XML Trusts policy, open up PowerShell and if you haven&#8217;t already, add the Citrix snapin which will give you the ability to use the Citrix cmdlets:</p>
<p><code>asnp citrix.*</code></p>
<p>Now enable the XML Trust:</p>
<p><code>Set-BrokerSite -TrustRequestsSentToTheXmlServicePort $true</code></p>
<p>Done, if everything goes well, you should see no confirmation or error messages like this:</p>
<p><a href="http://www.jasonsamuel.com/wp-content/uploads/2012/01/citrix-trust-requests-xml-service-xendesktop.jpg"><img src="http://www.jasonsamuel.com/wp-content/uploads/2012/01/citrix-trust-requests-xml-service-xendesktop-300x27.jpg" alt="" title="citrix-trust-requests-xml-service-xendesktop" width="300" height="27" class="aligncenter size-medium wp-image-1495" /></a></p>
<p>Now if you logout of your web interface, log back in, then attempt to launch the desktop, it should come right up and there are no more errors in your application event log.</p>
<p><a href="http://www.jasonsamuel.com/2012/01/17/how-to-fix-the-error-30105-citrix-servers-do-not-trust-the-server-message-in-xendesktop-5-5/">How to fix the Error 30105 Citrix servers do not trust the server message in XenDesktop 5.5</a> is a post from: <a href="http://www.jasonsamuel.com">JasonSamuel.com</a></p>
<p>More of my posts you might like:<ol>
<li><a href='http://www.jasonsamuel.com/2011/11/21/how-to-fix-the-tabctl32-ocx-is-not-registered-error-when-using-the-citrix-quick-launch-tool/' rel='bookmark' title='How to fix the TABCTL32.OCX is not registered error when using the Citrix Quick Launch tool'>How to fix the TABCTL32.OCX is not registered error when using the Citrix Quick Launch tool</a></li>
<li><a href='http://www.jasonsamuel.com/2011/10/26/how-to-force-an-uninstall-of-citrix-xenapp-or-presentation-server-via-command-line/' rel='bookmark' title='How to force an uninstall of Citrix XenApp or Presentation Server via command line'>How to force an uninstall of Citrix XenApp or Presentation Server via command line</a></li>
<li><a href='http://www.jasonsamuel.com/2012/01/05/how-to-fix-pass-through-authentication-the-windows-2008-logon-screen-on-xenapp-6-5web-interface-5-4-using-citrix-receiver/' rel='bookmark' title='How to fix pass-through authentication &amp; the Windows 2008 logon screen on XenApp 6.5/Web Interface 5.4 using Citrix Receiver'>How to fix pass-through authentication &#038; the Windows 2008 logon screen on XenApp 6.5/Web Interface 5.4 using Citrix Receiver</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.jasonsamuel.com/2012/01/17/how-to-fix-the-error-30105-citrix-servers-do-not-trust-the-server-message-in-xendesktop-5-5/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Getting Java web applications to work on Citrix XenApp</title>
		<link>http://www.jasonsamuel.com/2011/11/28/getting-java-web-applications-to-work-on-citrix-xenapp/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=getting-java-web-applications-to-work-on-citrix-xenapp</link>
		<comments>http://www.jasonsamuel.com/2011/11/28/getting-java-web-applications-to-work-on-citrix-xenapp/#comments</comments>
		<pubDate>Mon, 28 Nov 2011 21:59:35 +0000</pubDate>
		<dc:creator>Jason Samuel</dc:creator>
				<category><![CDATA[Citrix XenApp]]></category>
		<category><![CDATA[Citrix]]></category>
		<category><![CDATA[citrix xenapp]]></category>
		<category><![CDATA[internet explorer]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[java web applets]]></category>
		<category><![CDATA[jre]]></category>
		<category><![CDATA[publish IE]]></category>
		<category><![CDATA[publish URL]]></category>
		<category><![CDATA[xenapp]]></category>

		<guid isPermaLink="false">http://www.jasonsamuel.com/?p=1383</guid>
		<description><![CDATA[You might get a request to to publish an Internet Explorer URL/link in XenApp for whatever reason. Web applications that use Java Runtime Environment (JRE)/Java applets do not play nicely with Citrix XenApp. The main problem is the Java cache. It wants to write its cache to: C:\Program Files\Java\Cache\username\Sun\Java\Deployment\cache by default during a XenApp session [...]<p><a href="http://www.jasonsamuel.com/2011/11/28/getting-java-web-applications-to-work-on-citrix-xenapp/">Getting Java web applications to work on Citrix XenApp</a> is a post from: <a href="http://www.jasonsamuel.com">JasonSamuel.com</a></p>

More of my posts you might like:<ol>
<li><a href='http://www.jasonsamuel.com/2011/08/29/how-to-deploy-citrix-receiver-or-online-web-plugin-for-xenapp-6-5-on-web-interface-5-4/' rel='bookmark' title='How to Deploy Citrix Receiver or Online Web Plugin for XenApp 6.5 on Web Interface 5.4'>How to Deploy Citrix Receiver or Online Web Plugin for XenApp 6.5 on Web Interface 5.4</a></li>
<li><a href='http://www.jasonsamuel.com/2011/10/26/how-to-force-an-uninstall-of-citrix-xenapp-or-presentation-server-via-command-line/' rel='bookmark' title='How to force an uninstall of Citrix XenApp or Presentation Server via command line'>How to force an uninstall of Citrix XenApp or Presentation Server via command line</a></li>
<li><a href='http://www.jasonsamuel.com/2011/09/13/how-to-deploy-edgesight-5-4-xenapp-agents-using-install-scripts-to-all-your-citrix-farms/' rel='bookmark' title='How to deploy EdgeSight 5.4 XenApp agents using install scripts to all your Citrix Farms'>How to deploy EdgeSight 5.4 XenApp agents using install scripts to all your Citrix Farms</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>You might get a request to to publish an Internet Explorer URL/link in XenApp for whatever reason.  Web applications that use Java Runtime Environment (JRE)/Java applets do not play nicely with Citrix XenApp.  The main problem is the Java cache.  It wants to write its cache to:</p>
<p><code>C:\Program Files\Java\Cache\username\Sun\Java\Deployment\cache</code></p>
<p>by default during a XenApp session but nothing ever gets populated past the &#8220;username&#8221; part.  The directory underneath will be blank and your web application will never load the Java applet.</p>
<p><a href="http://www.jasonsamuel.com/wp-content/uploads/2011/11/21.jpg"><img src="http://www.jasonsamuel.com/wp-content/uploads/2011/11/21.jpg" alt="" title="2" width="472" height="347" class="aligncenter size-full wp-image-1388" /></a></p>
<p>I&#8217;m not a Java expert and I&#8217;m not even going to claim the following is any kind of best practice.  But this is what I have done in my environments to make the web apps work using XenApp.  If you have a better way of doing it, please do comment in this post.</p>
<p>So a little background, I am using Windows Server 2008 R2 with IE9 with Java (JRE) 6 Update 26 installed because my web app requires that specific version of Java.</p>
<p>1. Go to &#8220;<code>C:\WINDOWS\Sun\Java\Deployment</code>&#8221; and create a file called &#8220;<code>deployment.config</code>&#8221; with the following:</p>
<p><code>deployment.system.config=file\:C\:/WINDOWS/Sun/Java/Deployment/deployment.properties </code></p>
<p>2. Now create a file called &#8220;<code>deployment.properties</code>&#8221; in the same folder with your custom properties.  What I do is generate a deployment file and then copy it over to this directory.  To do this, open up Internet Explorer and go to your web app.  Once Java is invoked, you will notice the Java icon in the notification bar in the bottom right.  </p>
<p><a href="http://www.jasonsamuel.com/wp-content/uploads/2011/11/11.jpg"><img src="http://www.jasonsamuel.com/wp-content/uploads/2011/11/11.jpg" alt="" title="1" width="154" height="27" class="aligncenter size-full wp-image-1387" /></a></p>
<p>Right click on it > Open Control Panel > Settings and you will see a path where temporary files are kept.  </p>
<p><a href="http://www.jasonsamuel.com/wp-content/uploads/2011/11/0.jpg"><img src="http://www.jasonsamuel.com/wp-content/uploads/2011/11/0.jpg" alt="" title="0" width="474" height="348" class="aligncenter size-full wp-image-1406" /></a></p>
<p>This is the default Java cache and will look like:</p>
<p><code>C:\Users\username\AppData\LocalLow\Sun\Java\Deployment\cache</code></p>
<p>Navigate to:</p>
<p><code>C:\Users\username\AppData\LocalLow\Sun\Java\Deployment\</code></p>
<p>and there will be a file called &#8220;<code>deployment.properties</code>&#8221; that was just generated for you.  Just copy it over to the &#8220;<code>C:\WINDOWS\Sun\Java\Deployment</code>&#8221; folder as is.</p>
<p><a href="http://www.jasonsamuel.com/wp-content/uploads/2011/11/31.jpg"><img src="http://www.jasonsamuel.com/wp-content/uploads/2011/11/31-300x169.jpg" alt="" title="3" width="300" height="169" class="aligncenter size-medium wp-image-1391" /></a></p>
<p>Now you need to edit this file and specify the Java cache to be somewhere else.  In my case, I want it to go to a folder on my D: drive called JavaCache.  So all I add is this line (make sure the slashes are just like this, I know it&#8217;s a little odd):</p>
<p><code>deployment.user.cachedir=D\:\\JavaCache</code></p>
<p>So now my &#8220;<code>deployment.properties</code>&#8221; file will look like this:</p>
<p><pre><code>#deployment.properties
#Mon Nov 28 13:17:40 CST 2011
deployment.javaws.cache.update=true
deployment.version=6.0
deployment.user.cachedir=D\:\\JavaCache
deployment.capture.mime.types=true
deployment.javapi.cache.update=true
deployment.browser.path=C\:\\Program Files (x86)\\Internet Explorer\\iexplore.exe
#Java Web Start jre&#039;s
#Mon Nov 28 13:17:40 CST 2011
deployment.javaws.jre.0.registered=true
deployment.javaws.jre.0.platform=1.6
deployment.javaws.jre.0.osname=Windows
deployment.javaws.jre.0.path=C\:\\Program Files (x86)\\Java\\jre6\\bin\\javaw.exe
deployment.javaws.jre.0.product=1.6.0_26
deployment.javaws.jre.0.osarch=x86
deployment.javaws.jre.0.location=http\://java.sun.com/products/autodl/j2se
deployment.javaws.jre.0.enabled=true
deployment.javaws.jre.0.args=</code></pre></p>
<p>Yours will probably look different than mine depending on which version of JRE you have installed.</p>
<p>3. Make sure to create the location you specified above.  It can be a blank folder and will be populated the first time someone invokes Java.  So in my case, I created:</p>
<p><code>D:\JavaCache</code></p>
<p>4. Now publish IE and the URL like you normally would in the XenApp console.  <strong>IMPORTANT NOTE:</strong>  If you are using 32 bit IE and installed 32 bit Java, <strong>DO NOT</strong> publish 64 bit IE by accident.  It will not be able to use the 32 bit Java.  You will need to install 64 bit Java if you intend to use 64 bit IE.</p>
<p>Here is an example of how 32 bit IE should be published on Server 2008 R2 in XenApp 6.5:</p>
<p>Command line:<br />
<code>&quot;C:\Program Files (x86)\Internet Explorer\iexplore.exe&quot; &quot;http://www.google.com&quot;</code></p>
<p>Working directory:<br />
<code>C:\Program Files (x86)\Internet Explorer</code></p>
<p><a href="http://www.jasonsamuel.com/wp-content/uploads/2011/11/4.jpg"><img src="http://www.jasonsamuel.com/wp-content/uploads/2011/11/4-300x233.jpg" alt="" title="4" width="300" height="233" class="aligncenter size-medium wp-image-1394" /></a></p>
<p>5. That&#8217;s it, now launch your published IE web app from your desktop via the WI and it should load just fine.  Once Java is invoked, verify your Java cache is pointed at the new location.  Just look in your notification area for the Java icon, right click on it > Open Control Panel > Settings and you should see &#8220;<code>D:\JavaCache</code>&#8221;.</p>
<p><a href="http://www.jasonsamuel.com/wp-content/uploads/2011/11/5.jpg"><img src="http://www.jasonsamuel.com/wp-content/uploads/2011/11/5.jpg" alt="" title="5" width="473" height="347" class="aligncenter size-full wp-image-1398" /></a></p>
<p>One interesting thing to note, older versions of Java pull their deployment configuration from a different location.  So if putting everything in: </p>
<p><code>C:\WINDOWS\Sun\Java\Deployment</code></p>
<p>does not work for you, try copying them to:</p>
<p><code>C:\Program Files (x86)\Java\jre6\lib</code></p>
<p>and everything should work.  Just make sure to edit your &#8220;<code>deployment.config</code>&#8221; accordingly with the new path to &#8220;<code>deployment.properties</code>&#8221;.  An example, I have a web app that requires JRE 6 Update 11 and it pulls the deployment info from the lib folder and completely ignores the one in the Windows folder:</p>
<p><a href="http://www.jasonsamuel.com/wp-content/uploads/2011/11/6.jpg"><img src="http://www.jasonsamuel.com/wp-content/uploads/2011/11/6-300x275.jpg" alt="" title="6" width="300" height="275" class="aligncenter size-medium wp-image-1400" /></a></p>
<p>I also want to note that Oracle has pretty good documentation on configuring the deployment configuration file to your liking here:</p>
<p><a href="http://docs.oracle.com/javase/1.5.0/docs/guide/deployment/deployment-guide/properties.html">http://docs.oracle.com/javase/1.5.0/docs/guide/deployment/deployment-guide/properties.html</a></p>
<p>You can do quite a bit of customization to it.  Some of my web apps require certain things to be configured in Java such as suppressing certain warning messages and I have used this article to set those switches.  Again, I&#8217;m not a Java expert so there may be an easier way of doing this but this is how I have been able to get my Java web apps to work with XenApp.  Let me know of your experiences.</p>
<p><a href="http://www.jasonsamuel.com/2011/11/28/getting-java-web-applications-to-work-on-citrix-xenapp/">Getting Java web applications to work on Citrix XenApp</a> is a post from: <a href="http://www.jasonsamuel.com">JasonSamuel.com</a></p>
<p>More of my posts you might like:<ol>
<li><a href='http://www.jasonsamuel.com/2011/08/29/how-to-deploy-citrix-receiver-or-online-web-plugin-for-xenapp-6-5-on-web-interface-5-4/' rel='bookmark' title='How to Deploy Citrix Receiver or Online Web Plugin for XenApp 6.5 on Web Interface 5.4'>How to Deploy Citrix Receiver or Online Web Plugin for XenApp 6.5 on Web Interface 5.4</a></li>
<li><a href='http://www.jasonsamuel.com/2011/10/26/how-to-force-an-uninstall-of-citrix-xenapp-or-presentation-server-via-command-line/' rel='bookmark' title='How to force an uninstall of Citrix XenApp or Presentation Server via command line'>How to force an uninstall of Citrix XenApp or Presentation Server via command line</a></li>
<li><a href='http://www.jasonsamuel.com/2011/09/13/how-to-deploy-edgesight-5-4-xenapp-agents-using-install-scripts-to-all-your-citrix-farms/' rel='bookmark' title='How to deploy EdgeSight 5.4 XenApp agents using install scripts to all your Citrix Farms'>How to deploy EdgeSight 5.4 XenApp agents using install scripts to all your Citrix Farms</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.jasonsamuel.com/2011/11/28/getting-java-web-applications-to-work-on-citrix-xenapp/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>How to force an uninstall of Citrix XenApp or Presentation Server via command line</title>
		<link>http://www.jasonsamuel.com/2011/10/26/how-to-force-an-uninstall-of-citrix-xenapp-or-presentation-server-via-command-line/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=how-to-force-an-uninstall-of-citrix-xenapp-or-presentation-server-via-command-line</link>
		<comments>http://www.jasonsamuel.com/2011/10/26/how-to-force-an-uninstall-of-citrix-xenapp-or-presentation-server-via-command-line/#comments</comments>
		<pubDate>Wed, 26 Oct 2011 19:20:28 +0000</pubDate>
		<dc:creator>Jason Samuel</dc:creator>
				<category><![CDATA[Citrix XenApp]]></category>
		<category><![CDATA[Citrix]]></category>
		<category><![CDATA[presentation server]]></category>
		<category><![CDATA[xenapp]]></category>

		<guid isPermaLink="false">http://www.jasonsamuel.com/?p=1333</guid>
		<description><![CDATA[If you ever wanted to force an uninstall of XenApp or Presentation Server, you can do it with just one command. There are many scenarios where you might have to do this. Forcing an uninstall should always be a last resort though. You just navigate to your setup files to where mps.msi is located and [...]<p><a href="http://www.jasonsamuel.com/2011/10/26/how-to-force-an-uninstall-of-citrix-xenapp-or-presentation-server-via-command-line/">How to force an uninstall of Citrix XenApp or Presentation Server via command line</a> is a post from: <a href="http://www.jasonsamuel.com">JasonSamuel.com</a></p>

More of my posts you might like:<ol>
<li><a href='http://www.jasonsamuel.com/2009/07/22/how-to-install-and-configure-snmp-via-command-line-on-your-servers/' rel='bookmark' title='How to install and configure SNMP via command line on your servers'>How to install and configure SNMP via command line on your servers</a></li>
<li><a href='http://www.jasonsamuel.com/2011/09/13/how-to-deploy-edgesight-5-4-xenapp-agents-using-install-scripts-to-all-your-citrix-farms/' rel='bookmark' title='How to deploy EdgeSight 5.4 XenApp agents using install scripts to all your Citrix Farms'>How to deploy EdgeSight 5.4 XenApp agents using install scripts to all your Citrix Farms</a></li>
<li><a href='http://www.jasonsamuel.com/2011/08/29/how-to-deploy-citrix-receiver-or-online-web-plugin-for-xenapp-6-5-on-web-interface-5-4/' rel='bookmark' title='How to Deploy Citrix Receiver or Online Web Plugin for XenApp 6.5 on Web Interface 5.4'>How to Deploy Citrix Receiver or Online Web Plugin for XenApp 6.5 on Web Interface 5.4</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>If you ever wanted to force an uninstall of XenApp or Presentation Server, you can do it with just one command.  There are many scenarios where you might have to do this.  Forcing an uninstall should always be a last resort though.  You just navigate to your setup files to where mps.msi is located and run the following.  In this example, I have copied the XenApp 6.5 install files to my D: drive:</p>
<p><code>D:\InstallFiles\XenApp6.5\XenApp Server\w2k8x64</code></p>
<p>and type the following command:</p>
<p><code>msiexec /x MPS.msi CTX_MF_FORCE_SUBSYSTEM_UNINSTALL=YES</code></p>
<p>This will bring up the following prompt:</p>
<p><a href="http://www.jasonsamuel.com/wp-content/uploads/2011/10/21.jpg"><img src="http://www.jasonsamuel.com/wp-content/uploads/2011/10/21.jpg" alt="" title="2" width="315" height="137" class="aligncenter size-full wp-image-1334" /></a></p>
<p>and then you just run through the uninstaller and reboot when it prompts you.</p>
<p>Now if you don&#8217;t have mps.msi on your server and don&#8217;t have time to find the media and copy the install files over, here is a nice trick.  Open regedit to edit your registry and navigate to:</p>
<p><code>HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall</code></p>
<p>Now find the key with the Display Name of Citrix Presentation Server or XenApp, here is a screenshot from a Presentation Server 4.5 box for example:</p>
<p><a href="http://www.jasonsamuel.com/wp-content/uploads/2011/10/32.jpg"><img src="http://www.jasonsamuel.com/wp-content/uploads/2011/10/32.jpg" alt="" title="3" width="798" height="574" class="aligncenter size-full wp-image-1335" /></a></p>
<p>Right on the key and copy the key name:</p>
<p><a href="http://www.jasonsamuel.com/wp-content/uploads/2011/10/44.jpg"><img src="http://www.jasonsamuel.com/wp-content/uploads/2011/10/44.jpg" alt="" title="4" width="303" height="245" class="aligncenter size-full wp-image-1336" /></a></p>
<p>Paste it into Notepad.  It will be the full path of the key but just copy the key part only:</p>
<p><a href="http://www.jasonsamuel.com/wp-content/uploads/2011/10/51.jpg"><img src="http://www.jasonsamuel.com/wp-content/uploads/2011/10/51.jpg" alt="" title="5" width="479" height="177" class="aligncenter size-full wp-image-1337" /></a></p>
<p>Then open up a command prompt and type the following but with the key you saw on your server.  Here is mine for example::</p>
<p><code>msiexec /x {44412985-02EE-4824-9EA5-B2AF6D98924E} CTX_MF_FORCE_SUBSYSTEM_UNINSTALL=YES</code></p>
<p>Once you hit enter, it will pop up with the uninstall dialog and you can run through it to complete your uninstall:</p>
<p><a href="http://www.jasonsamuel.com/wp-content/uploads/2011/10/62.jpg"><img src="http://www.jasonsamuel.com/wp-content/uploads/2011/10/62.jpg" alt="" title="6" width="666" height="332" class="aligncenter size-full wp-image-1338" /></a></p>
<p>Just keep in mind that the force uninstall switch only uninstalls XenApp/Presentation Server.  It will not uninstall all of the little plugins and other modules that were install when you original setup your Citrix server:</p>
<p><strong>BEFORE:</strong><br />
<a href="http://www.jasonsamuel.com/wp-content/uploads/2011/10/11.jpg"><img src="http://www.jasonsamuel.com/wp-content/uploads/2011/10/11.jpg" alt="" title="1" width="603" height="354" class="aligncenter size-full wp-image-1339" /></a></p>
<p><strong>AFTER:</strong><br />
<a href="http://www.jasonsamuel.com/wp-content/uploads/2011/10/71.jpg"><img src="http://www.jasonsamuel.com/wp-content/uploads/2011/10/71.jpg" alt="" title="7" width="623" height="268" class="aligncenter size-full wp-image-1340" /></a></p>
<p><a href="http://www.jasonsamuel.com/2011/10/26/how-to-force-an-uninstall-of-citrix-xenapp-or-presentation-server-via-command-line/">How to force an uninstall of Citrix XenApp or Presentation Server via command line</a> is a post from: <a href="http://www.jasonsamuel.com">JasonSamuel.com</a></p>
<p>More of my posts you might like:<ol>
<li><a href='http://www.jasonsamuel.com/2009/07/22/how-to-install-and-configure-snmp-via-command-line-on-your-servers/' rel='bookmark' title='How to install and configure SNMP via command line on your servers'>How to install and configure SNMP via command line on your servers</a></li>
<li><a href='http://www.jasonsamuel.com/2011/09/13/how-to-deploy-edgesight-5-4-xenapp-agents-using-install-scripts-to-all-your-citrix-farms/' rel='bookmark' title='How to deploy EdgeSight 5.4 XenApp agents using install scripts to all your Citrix Farms'>How to deploy EdgeSight 5.4 XenApp agents using install scripts to all your Citrix Farms</a></li>
<li><a href='http://www.jasonsamuel.com/2011/08/29/how-to-deploy-citrix-receiver-or-online-web-plugin-for-xenapp-6-5-on-web-interface-5-4/' rel='bookmark' title='How to Deploy Citrix Receiver or Online Web Plugin for XenApp 6.5 on Web Interface 5.4'>How to Deploy Citrix Receiver or Online Web Plugin for XenApp 6.5 on Web Interface 5.4</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.jasonsamuel.com/2011/10/26/how-to-force-an-uninstall-of-citrix-xenapp-or-presentation-server-via-command-line/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Citrix announces FREE 5 Mbps VPX Express and FREE Platinum edition VPX Developer</title>
		<link>http://www.jasonsamuel.com/2011/03/02/citrix-announces-free-5-mbps-vpx-express-and-free-platinum-edition-vpx-developer/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=citrix-announces-free-5-mbps-vpx-express-and-free-platinum-edition-vpx-developer</link>
		<comments>http://www.jasonsamuel.com/2011/03/02/citrix-announces-free-5-mbps-vpx-express-and-free-platinum-edition-vpx-developer/#comments</comments>
		<pubDate>Wed, 02 Mar 2011 08:22:37 +0000</pubDate>
		<dc:creator>Jason Samuel</dc:creator>
				<category><![CDATA[Citrix NetScaler]]></category>
		<category><![CDATA[Citrix]]></category>
		<category><![CDATA[netscaler]]></category>

		<guid isPermaLink="false">http://www.jasonsamuel.com/?p=888</guid>
		<description><![CDATA[Citrix is now offering Netscaler VPX Express licenses with throughput increased from 1 Mbps to 5 Mbps! This will help tremendously in test lab environments for a lot of people. Most of my important test environments where I need some extra bandwidth were on VPX 10 or VPX 200 licenses already but now with a [...]<p><a href="http://www.jasonsamuel.com/2011/03/02/citrix-announces-free-5-mbps-vpx-express-and-free-platinum-edition-vpx-developer/">Citrix announces FREE 5 Mbps VPX Express and FREE Platinum edition VPX Developer</a> is a post from: <a href="http://www.jasonsamuel.com">JasonSamuel.com</a></p>

More of my posts you might like:<ol>
<li><a href='http://www.jasonsamuel.com/2011/02/25/how-to-tell-what-license-and-edition-you-have-applied-to-a-netscaler-vpx-appliance/' rel='bookmark' title='How to tell what license and edition you have applied to a Netscaler VPX appliance'>How to tell what license and edition you have applied to a Netscaler VPX appliance</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Citrix is now offering Netscaler VPX Express licenses with throughput increased from 1 Mbps to 5 Mbps!  This will help tremendously in test lab environments for a lot of people.  Most of my important test environments where I need some extra bandwidth were on VPX 10 or VPX 200 licenses already but now with a 5 Mbps throughput VPX Express for free, it gives me a little more wiggle room before I need to shell out the cash for these licenses.</p>
<p>That&#8217;s not all!  Now those of us that are existing Netscaler customers are entitled to VPX Developer edition licenses with Platinum edition features!  This makes testing features like integrated caching for example easier without having to pay for a license first.  Sadly you are limited to 1 Mbps but it should be more than enough to test low bandwidth apps against Platinum features.  You can always get a 90 eval though which has a 1 Gbps limited if you really need the extra bandwidth for testing.</p>
<p>Good move on Citrix&#8217;s part!  This how how you corner the application delivery market and then stay on top.  Give it away for free and let people see how powerful the Netscaler platform is first hand.</p>
<p><a href="http://www.jasonsamuel.com/wp-content/uploads/2011/03/new-vpx-express-developer-licensing.jpg"><img src="http://www.jasonsamuel.com/wp-content/uploads/2011/03/new-vpx-express-developer-licensing.jpg" alt="" title="new-vpx-express-developer-licensing" width="717" height="217" class="aligncenter size-full wp-image-889" /></a></p>
<p>Read more about the changes on the Citrix Community blog <a href="http://community.citrix.com/display/ocb/2011/02/28/NetScaler+VPX+Express+Sets+Your+Networks+%28Even%29+Free%28-er+than+Before!%29">here</a>.  </p>
<p><a href="http://www.jasonsamuel.com/2011/03/02/citrix-announces-free-5-mbps-vpx-express-and-free-platinum-edition-vpx-developer/">Citrix announces FREE 5 Mbps VPX Express and FREE Platinum edition VPX Developer</a> is a post from: <a href="http://www.jasonsamuel.com">JasonSamuel.com</a></p>
<p>More of my posts you might like:<ol>
<li><a href='http://www.jasonsamuel.com/2011/02/25/how-to-tell-what-license-and-edition-you-have-applied-to-a-netscaler-vpx-appliance/' rel='bookmark' title='How to tell what license and edition you have applied to a Netscaler VPX appliance'>How to tell what license and edition you have applied to a Netscaler VPX appliance</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.jasonsamuel.com/2011/03/02/citrix-announces-free-5-mbps-vpx-express-and-free-platinum-edition-vpx-developer/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to automatically put up a maintenance page on a Netscaler when all your websites are down</title>
		<link>http://www.jasonsamuel.com/2011/03/01/how-to-automatically-put-up-a-maintenance-page-on-a-netscaler-when-all-your-websites-are-down/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=how-to-automatically-put-up-a-maintenance-page-on-a-netscaler-when-all-your-websites-are-down</link>
		<comments>http://www.jasonsamuel.com/2011/03/01/how-to-automatically-put-up-a-maintenance-page-on-a-netscaler-when-all-your-websites-are-down/#comments</comments>
		<pubDate>Tue, 01 Mar 2011 15:52:35 +0000</pubDate>
		<dc:creator>Jason Samuel</dc:creator>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[Citrix NetScaler]]></category>
		<category><![CDATA[IIS]]></category>
		<category><![CDATA[Citrix]]></category>
		<category><![CDATA[netscaler]]></category>

		<guid isPermaLink="false">http://www.jasonsamuel.com/?p=804</guid>
		<description><![CDATA[In a worst case scenario and all your web servers have failed, what do you do? You could have a standby group of servers or CDN on or off premise to pick up the load or at least display a maintenance page but this is worst case scenario. A catastrophic failure and ALL your servers [...]<p><a href="http://www.jasonsamuel.com/2011/03/01/how-to-automatically-put-up-a-maintenance-page-on-a-netscaler-when-all-your-websites-are-down/">How to automatically put up a maintenance page on a Netscaler when all your websites are down</a> is a post from: <a href="http://www.jasonsamuel.com">JasonSamuel.com</a></p>

More of my posts you might like:<ol>
<li><a href='http://www.jasonsamuel.com/2010/07/16/getting-around-netscaler-client-ip-issues-without-having-to-use-usip/' rel='bookmark' title='Getting around Netscaler Client IP issues without having to use USIP'>Getting around Netscaler Client IP issues without having to use USIP</a></li>
<li><a href='http://www.jasonsamuel.com/2011/01/06/change-all-http-requests-to-ssl-https-on-a-netscaler/' rel='bookmark' title='Change all HTTP requests to SSL/HTTPS on a Netscaler'>Change all HTTP requests to SSL/HTTPS on a Netscaler</a></li>
<li><a href='http://www.jasonsamuel.com/2010/08/09/verifying-that-sslv2-and-weak-ciphers-are-disabled-for-pci-compliance/' rel='bookmark' title='Verifying that SSLv2 and weak ciphers are disabled for PCI compliance'>Verifying that SSLv2 and weak ciphers are disabled for PCI compliance</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>In a worst case scenario and all your web servers have failed, what do you do?  You could have a standby group of servers or CDN on or off premise to pick up the load or at least display a maintenance page but this is worst case scenario.  A catastrophic failure and ALL your servers are down due to a code issue, server configuration issue, database issue, virtual infrastructure failure, SAN failure, maintenance being performed on all servers at once (I hope not on purpose), virus outbreak, or whatever else kind of horrible scenario you can think of. You get traffic all the way up to the Netscaler appliance but since your vserver is down, the user&#8217;s browser will timeout as if your company fell off the face of the earth.  This is very unprofessional for any organization.  Users timing out or seeing a &#8220;page could not be displayed&#8221; error is unacceptable.</p>
<p>So the solution is to have the Netscaler display a maintenance page with the code hosted on itself somehow.  I tried several different methods including content filtering and responder policies using HTML.  Originally I even thought I could leverage integrated caching to serve up cached pages and static content like images.  I settled only using a responder policy initially which worked.  Citrix even has a very nice knowledge center article (CTX117337: How to Configure a Maintenance Web Page by using the Responder Feature of the NetScaler Appliance) which is located here:</p>
<p><a href="http://support.citrix.com/article/CTX117337">http://support.citrix.com/article/CTX117337</a></p>
<p>In a nutshell, what the author of the article wrote is basically more or less the same conclusion I reached as well.  I just did it via GUI and that is what I will show you below.  But I was not happy with the result.  Keep reading and you will see why.  FYI, I did all the screenshots below on an NS 9.1 appliance but it is the same procedure on NS 9.2 or any other version.  </p>
<p>1. I am going to assume you have servers, services/service groups, and a vserver already that is UP and running.  I will call them the following in this example:</p>
<p>vserver &#8211; <strong>lb_vsver_mywebsite</strong><br />
service group &#8211; <strong>svcgrp_myservicegroup</strong><br />
server &#8211; <strong>svr_mywebserver</strong></p>
<p>Excuse the redactions in my screenshots please, I had some other configurations on this test appliance and I don&#8217;t want to confuse you with it:</p>
<p>vserver:<br />
<a href="http://www.jasonsamuel.com/wp-content/uploads/2011/02/1.gif"><img src="http://www.jasonsamuel.com/wp-content/uploads/2011/02/1-300x55.gif" alt="" title="1" width="300" height="55" class="aligncenter size-medium wp-image-805" /></a></p>
<p>service group:<br />
<a href="http://www.jasonsamuel.com/wp-content/uploads/2011/02/2.gif"><img src="http://www.jasonsamuel.com/wp-content/uploads/2011/02/2-300x56.gif" alt="" title="2" width="300" height="56" class="aligncenter size-medium wp-image-806" /></a></p>
<p>server:<br />
<a href="http://www.jasonsamuel.com/wp-content/uploads/2011/02/3.gif"><img src="http://www.jasonsamuel.com/wp-content/uploads/2011/02/3-300x76.gif" alt="" title="3" width="300" height="76" class="aligncenter size-medium wp-image-807" /></a></p>
<p>2. Now create a backup vserver for your existing live vserver.  In this example, I have called it &#8220;lb_vsvr_bkup_mywebsite&#8221;.  But instead of giving it an IP, just uncheck directly addressable.  This will cause the IP area to become greyed out:</p>
<p>backup vserver:<br />
<a href="http://www.jasonsamuel.com/wp-content/uploads/2011/02/4.gif"><img src="http://www.jasonsamuel.com/wp-content/uploads/2011/02/4-300x244.gif" alt="" title="4" width="300" height="244" class="aligncenter size-medium wp-image-818" /></a></p>
<p>When you click Create, it will show up as running on the IP 0.0.0.0 like below:<br />
<a href="http://www.jasonsamuel.com/wp-content/uploads/2011/02/5.gif"><img src="http://www.jasonsamuel.com/wp-content/uploads/2011/02/5-300x65.gif" alt="" title="5" width="300" height="65" class="aligncenter size-medium wp-image-819" /></a></p>
<p>3. Now you need to create a service that is always UP and bind it to this backup vserver so that it will always remain UP.  Just go under Load Balancing >  Services, and click Add.  Then create a service called &#8220;svc_maintpage&#8221; but for the Server, type in the localhost IP of 127.0.0.1, add a ping monitor, and press create.</p>
<p><a href="http://www.jasonsamuel.com/wp-content/uploads/2011/02/6.gif"><img src="http://www.jasonsamuel.com/wp-content/uploads/2011/02/6-300x221.gif" alt="" title="6" width="300" height="221" class="aligncenter size-medium wp-image-821" /></a></p>
<p>4. Now go back to your backup vserver and bind this new service to it.  Immediately after clicking OK, the backup vserver should go into an UP state.  You might need to refresh your window if it doesn&#8217;t.</p>
<p><a href="http://www.jasonsamuel.com/wp-content/uploads/2011/02/7.gif"><img src="http://www.jasonsamuel.com/wp-content/uploads/2011/02/7-300x245.gif" alt="" title="7" width="300" height="245" class="aligncenter size-medium wp-image-822" /></a></p>
<p>5. Now double click on your live vserver and under the Advanced tab, choose &#8220;lb_vsvr_bkup_mywebsite&#8221; for the Backup Virtual Server option and press OK:</p>
<p><a href="http://www.jasonsamuel.com/wp-content/uploads/2011/02/8.gif"><img src="http://www.jasonsamuel.com/wp-content/uploads/2011/02/8-300x245.gif" alt="" title="8" width="300" height="245" class="aligncenter size-medium wp-image-823" /></a></p>
<p>6. Now under Responder > Action, click Add to create a new action.  This is where you get to put some HTML and CSS.  It must be very basic, all parenthesis have to be removed when using CSS in the HTML body or it will give you can error, and the whole policy must be under 255 characters total.  I will name mine &#8220;action_mywebsite_maint_page&#8221; and here is an example of my policy I will use with it:</p>
<p><pre><code>
&quot;HTTP/1.0 200 OK&quot; +&quot;\r\n\r\n&quot; + &quot;&lt;html&gt;
&lt;style type=text/css&gt;
&lt;!--
.mywebsitefont {
&nbsp;&nbsp;font-size: 24px;
}
--&gt;
&lt;/style&gt;
&lt;body class=mywebsitefont&gt;Sorry, our website is currently not available. 
Please try again later.&lt;/body&gt;&lt;/html&gt;&quot; + &quot;\r\n&quot;
</code></pre></p>
<p><a href="http://www.jasonsamuel.com/wp-content/uploads/2011/02/9.gif"><img src="http://www.jasonsamuel.com/wp-content/uploads/2011/02/9-300x214.gif" alt="" title="9" width="300" height="214" class="aligncenter size-medium wp-image-824" /></a></p>
<p>7. Now under Responder > Policy, click Add to create a new policy that will call on the action you just created.  In this example, all we need is for the HTTP request to be valid and we will display the maintenance page.  I will name it &#8220;resp_policy_mywebsite_down&#8221; in this example.  Choose the action you just made in the Action drop down and for the expression, just put:</p>
<p><strong>HTTP.REQ.IS_VALID </strong></p>
<p><a href="http://www.jasonsamuel.com/wp-content/uploads/2011/02/10.gif"><img src="http://www.jasonsamuel.com/wp-content/uploads/2011/02/10-300x183.gif" alt="" title="10" width="300" height="183" class="aligncenter size-medium wp-image-825" /></a></p>
<p>8. Now go back to the Load Balancing folder and double click your backup vserver and bind the responder policy to it like below:</p>
<p><a href="http://www.jasonsamuel.com/wp-content/uploads/2011/02/11.gif"><img src="http://www.jasonsamuel.com/wp-content/uploads/2011/02/11-300x245.gif" alt="" title="11" width="300" height="245" class="aligncenter size-medium wp-image-826" /></a></p>
<p>9. Now to test.  Open up your website in a browser and it should display as normal right now.  Now login to your webservers and turn off your websites.  Immediately your live vserver should say DOWN for the State but the Effective State should remain UP.  This is because all traffic is being forwarded to your backup vserver you specified earlier which is set to always be up:</p>
<p><a href="http://www.jasonsamuel.com/wp-content/uploads/2011/02/12.gif"><img src="http://www.jasonsamuel.com/wp-content/uploads/2011/02/12-300x59.gif" alt="" title="12" width="300" height="59" class="aligncenter size-medium wp-image-827" /></a></p>
<p>Refresh your browser and you should now see the maintenance page you created like below:</p>
<p><a href="http://www.jasonsamuel.com/wp-content/uploads/2011/02/13.gif"><img src="http://www.jasonsamuel.com/wp-content/uploads/2011/02/13-300x105.gif" alt="" title="13" width="300" height="105" class="aligncenter size-medium wp-image-828" /></a></p>
<p>As you can see, a simple HTML page like above is not very professional.  We need more HTML/CSS than 255 characters to work with and we need images working to make it look professional. At least it is better than a page timeout though!</p>
<p>Now with a content filtering policy, you don&#8217;t have to worry about a character limit.  You can get away with putting HTML/CSS in a content filter policy.  But again, where do the images come from?</p>
<p>I decided to call Citrix and see if they have run into a request like this.  They had not.  Now off the bat both techs I spoke to said what I was trying to do is not supported by Citrix.  A Netscaler is not designed to do this.  But luckily the second tech Brian at Citrix Support was just as enthusiastic about getting something to work as I am and wasn&#8217;t going to give up easily so we went over a few scenarios.  The Netscaler does have an Apache web server on board, that is how the admin GUI is display to you.  It is also how the Access Gateway portal is displayed to the end user.  We needed to figure out a way to leverage the Apache web server on board the Netscaler to host our images, HTML, CSS, etc.  The initial thought was to overwrite the Access Gateway portal and create a responder policy that would do a redirect to an Access Gateway vserver you create.  The negatives here are that you are limited to SSL traffic only, have to worry about having a valid cert, you can&#8217;t bind all the policies you might need to it like you can a load balanced VIP, etc.  I didn&#8217;t feel that comfortable destroying functionality to gain other functionality either.</p>
<p>In the end, the solution was easy and did not require overwriting the Access Gateway portal.  We can host our HTML, CSS, and images on the Netscaler itself and point Apache at it.  Brian did a quick proof of concept in his lab.  Then I improved on it a bit.  Here is the end result which I am sure a lot of you will find pretty handy in your organizations.  Steps 1 through 5 are the same as above.  Then from there, begin these steps:</p>
<p>1. First we need to get our HTML, CSS, and images on the Netscaler.  WinSCP into your Netscaler and go to &#8220;/netscaler/ns_gui&#8221;.  The folders you see called admin_ui, vpn, etc. are what host the Netscaler Admin GUI and Access Gateway respectively.  So you have the option of putting something in the root of this folder or even create a separate folder here if you want.  In my case, I decided to put a &#8220;maintenance.htm&#8221; in the root and also create a folder called &#8220;static&#8221; that will host most static content like CSS and images.</p>
<p><a href="http://www.jasonsamuel.com/wp-content/uploads/2011/02/14.gif"><img src="http://www.jasonsamuel.com/wp-content/uploads/2011/02/14-300x91.gif" alt="" title="14" width="300" height="91" class="aligncenter size-medium wp-image-829" /></a></p>
<p>2. Now under Responder > Action, click Add to create a new action.  Very important, make sure to change the type from Response to Redirect.  The action should be the following (with parenthesis included):</p>
<p><code>&quot;http://www.mywebsite.com/maintenance.htm&quot;</code></p>
<p><a href="http://www.jasonsamuel.com/wp-content/uploads/2011/02/15.gif"><img src="http://www.jasonsamuel.com/wp-content/uploads/2011/02/15-300x214.gif" alt="" title="15" width="300" height="214" class="aligncenter size-medium wp-image-830" /></a></p>
<p>3.  Now under Responder > Policy, click Add to create a new policy that will call on the action you just created..  Your responder policy will need to allow the maintenance page, plus CSS, .gifs, and .jpgs you might use.  So the policy I will use is:</p>
<p><code>!HTTP.REQ.URL.CONTAINS(&quot;maintenance.htm&quot;) &amp;&amp; !HTTP.REQ.URL.CONTAINS(&quot;.gif&quot;) &amp;&amp; !HTTP.REQ.URL.CONTAINS(&quot;.jpg&quot;) &amp;&amp; !HTTP.REQ.URL.CONTAINS(&quot;.css&quot;)</code></p>
<p><a href="http://www.jasonsamuel.com/wp-content/uploads/2011/02/16.gif"><img src="http://www.jasonsamuel.com/wp-content/uploads/2011/02/16-300x183.gif" alt="" title="16" width="300" height="183" class="aligncenter size-medium wp-image-831" /></a></p>
<p>4. Now go back to the Load Balancing folder and double click your backup vserver and bind this new responder policy to it like I did below:</p>
<p><a href="http://www.jasonsamuel.com/wp-content/uploads/2011/02/11.gif"><img src="http://www.jasonsamuel.com/wp-content/uploads/2011/02/11-300x245.gif" alt="" title="11" width="300" height="245" class="aligncenter size-medium wp-image-826" /></a></p>
<p>Now if you disable your service groups and check your maintenance page again, you can see how the website displays the full page with nice HTML, CSS, and images.  In this example, I borrowed the Sears.com maintenance page.  Notice how showing your company logo keeps your branding intact even on a maintenance page which is the correct way to handle a website issue.  Tell your users you are aware of the problem and offer alternatives in the meantime (static links along the bottom to other servers that are up and offering content in this example).  You don&#8217;t have to go that far but it&#8217;s always nice to let your user base know you haven&#8217;t disappeared and your infrastructure is solid.  This is very professional and above all, automated! <img src='http://www.jasonsamuel.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />   </p>
<p><a href="http://www.jasonsamuel.com/wp-content/uploads/2011/02/17.gif"><img src="http://www.jasonsamuel.com/wp-content/uploads/2011/02/17-300x232.gif" alt="" title="17" width="300" height="232" class="aligncenter size-medium wp-image-832" /></a></p>
<p>The only problem here is that when your website is back up, users will still be refreshing on this maintenance.htm page.  They will get a 404 error.  So you have four options.  I usually prefer number 4 personally but it all depends on your needs:  </p>
<p>1. Change your maintenance.htm page to say index.htm or whatever page is the default page of the root of your website so when they refresh once the vserver is back up, they will get the live page.  You will need to WinSCP into your Netscaler again and change the maintenance.htm file name as well as change it in your Responder Action.  The issue here is if let&#8217;s say you are using .NET, you can&#8217;t call it index.aspx because Apache on the Netscaler can&#8217;t parse it.</p>
<p>2. Just create a link on the page that says &#8220;Click Here to Try Again&#8221; which is pointed at the correct index page.  This assumes the end user will actually click the link instead of hitting refresh.  You can&#8217;t be 100% sure they will do this.</p>
<p>3. Create a maintenance.htm page on your servers and then set IIS, Apache, or whatever web server you use to do a 301 redirect to your live index page.  You can leverage the Netscaler to do the redirect too of course.</p>
<p>4. My preferred method.  Create a new responder policy saying any maintenance.htm should automatically redirect to index.aspx and bind it only to your real vserver.  That way anyone that requests that page when your servers are up will always be redirected to your index page.  In this example, I will call my live site&#8217;s index page index.asp and call the action policy &#8220;action_mywebsite_index_redirect&#8221;.  I will also make it redirect to SSL in this example because there is a login box on the index.asp page and I want to keep it secure using https:</p>
<p><a href="http://www.jasonsamuel.com/wp-content/uploads/2011/02/18.gif"><img src="http://www.jasonsamuel.com/wp-content/uploads/2011/02/18-300x214.gif" alt="" title="18" width="300" height="214" class="aligncenter size-medium wp-image-833" /></a></p>
<p>I will call the responder policy &#8220;resp_policy_index_redirect&#8221; and for the expression, tell it to redirect any requests to &#8220;/maintenance.htm&#8221;:</p>
<p><code>HTTP.REQ.URL.CONTAINS(&quot;/maintenance.htm&quot;)</code></p>
<p><a href="http://www.jasonsamuel.com/wp-content/uploads/2011/02/19.gif"><img src="http://www.jasonsamuel.com/wp-content/uploads/2011/02/19-300x179.gif" alt="" title="19" width="300" height="179" class="aligncenter size-medium wp-image-834" /></a></p>
<p>Now bind this to your live vserver:</p>
<p><a href="http://www.jasonsamuel.com/wp-content/uploads/2011/02/20.gif"><img src="http://www.jasonsamuel.com/wp-content/uploads/2011/02/20-300x245.gif" alt="" title="20" width="300" height="245" class="aligncenter size-medium wp-image-835" /></a></p>
<p>Now you can test it by disabling and enabling your servers or service groups.  It should transition automatically between your maintenance page and the live index page. <img src='http://www.jasonsamuel.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>One thing I would like to point out.  On any of your Responder Policies or Actions, you can always view the hit counter to see if the policy or action is being invoked.  This might help you when you are setting this up initially and something goes wrong and you want to see if the policy or action is being hit:</p>
<p><a href="http://www.jasonsamuel.com/wp-content/uploads/2011/02/21.gif"><img src="http://www.jasonsamuel.com/wp-content/uploads/2011/02/21-300x44.gif" alt="" title="21" width="300" height="44" class="aligncenter size-medium wp-image-836" /></a></p>
<p>So there it is.  Your Netscaler is now an emergency web server that automatically puts up a professional looking maintenance page in a worst case scenario when every backend web server you have is down.  A big thank you to Brian at Citrix for the help!  If anyone can think of any improvements to this process or has any trouble with it, please reply I would love to hear about your experience.</p>
<p><a href="http://www.jasonsamuel.com/2011/03/01/how-to-automatically-put-up-a-maintenance-page-on-a-netscaler-when-all-your-websites-are-down/">How to automatically put up a maintenance page on a Netscaler when all your websites are down</a> is a post from: <a href="http://www.jasonsamuel.com">JasonSamuel.com</a></p>
<p>More of my posts you might like:<ol>
<li><a href='http://www.jasonsamuel.com/2010/07/16/getting-around-netscaler-client-ip-issues-without-having-to-use-usip/' rel='bookmark' title='Getting around Netscaler Client IP issues without having to use USIP'>Getting around Netscaler Client IP issues without having to use USIP</a></li>
<li><a href='http://www.jasonsamuel.com/2011/01/06/change-all-http-requests-to-ssl-https-on-a-netscaler/' rel='bookmark' title='Change all HTTP requests to SSL/HTTPS on a Netscaler'>Change all HTTP requests to SSL/HTTPS on a Netscaler</a></li>
<li><a href='http://www.jasonsamuel.com/2010/08/09/verifying-that-sslv2-and-weak-ciphers-are-disabled-for-pci-compliance/' rel='bookmark' title='Verifying that SSLv2 and weak ciphers are disabled for PCI compliance'>Verifying that SSLv2 and weak ciphers are disabled for PCI compliance</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.jasonsamuel.com/2011/03/01/how-to-automatically-put-up-a-maintenance-page-on-a-netscaler-when-all-your-websites-are-down/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>How to tell what license and edition you have applied to a Netscaler VPX appliance</title>
		<link>http://www.jasonsamuel.com/2011/02/25/how-to-tell-what-license-and-edition-you-have-applied-to-a-netscaler-vpx-appliance/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=how-to-tell-what-license-and-edition-you-have-applied-to-a-netscaler-vpx-appliance</link>
		<comments>http://www.jasonsamuel.com/2011/02/25/how-to-tell-what-license-and-edition-you-have-applied-to-a-netscaler-vpx-appliance/#comments</comments>
		<pubDate>Fri, 25 Feb 2011 18:29:28 +0000</pubDate>
		<dc:creator>Jason Samuel</dc:creator>
				<category><![CDATA[Citrix NetScaler]]></category>
		<category><![CDATA[Citrix]]></category>
		<category><![CDATA[netscaler]]></category>

		<guid isPermaLink="false">http://www.jasonsamuel.com/?p=782</guid>
		<description><![CDATA[I get asked this question a lot. How do you tell what license you have applied to a Netscaler VPX appliance? The next question is what edition VPX do I have: Standard, Enterprise, or Platinum? Most people expect either one of these very important pieces of info would be displayed right along the top header [...]<p><a href="http://www.jasonsamuel.com/2011/02/25/how-to-tell-what-license-and-edition-you-have-applied-to-a-netscaler-vpx-appliance/">How to tell what license and edition you have applied to a Netscaler VPX appliance</a> is a post from: <a href="http://www.jasonsamuel.com">JasonSamuel.com</a></p>

More of my posts you might like:<ol>
<li><a href='http://www.jasonsamuel.com/2010/06/22/how-to-update-your-citrix-netscaler-firmware/' rel='bookmark' title='How to update your Citrix Netscaler firmware'>How to update your Citrix Netscaler firmware</a></li>
<li><a href='http://www.jasonsamuel.com/2010/08/05/how-to-create-and-link-an-ssl-certificate-chain-for-a-citrix-netscaler/' rel='bookmark' title='How to create and link an SSL certificate chain for a Citrix Netscaler'>How to create and link an SSL certificate chain for a Citrix Netscaler</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>I get asked this question a lot.  How do you tell what license you have applied to a Netscaler VPX appliance?  The next question is what edition VPX do I have: Standard, Enterprise, or Platinum?  Most people expect either one of these very important pieces of info would be displayed right along the top header where the IP and hostname are or at least under the main System window under the Hardware Information section but it is not.  You can figure out what version you have by looking at the features of the appliance and looking at the current throughput to deduce the license and edition but that is not very practical.  There are 3 ways you can see the current license applied easily without having to play detective:</p>
<p>1. Click Licenses under the System folder and the last item in the first column is &#8220;Model ID&#8221;.  For physical devices, it will show the model number like 7500, 9500, 15000, 17500 etc.  But for VPX appliances, it will say 1 for the the free VPX Express appliance (denoting the 1 Mbps limit) and 10, 200, 1000, or 3000 for the pay for licenses.  If you just upgraded from the free version to a pay for version, you can verify it was applied here at a glance easily.</p>
<p><a href="http://www.jasonsamuel.com/wp-content/uploads/2011/02/vpx-license.gif"><img src="http://www.jasonsamuel.com/wp-content/uploads/2011/02/vpx-license-300x187.gif" alt="" title="vpx-license" width="300" height="187" class="aligncenter size-medium wp-image-797" /></a></p>
<p>2. WinSCP down the license file from the appliance and open it in Notepad or any text editor.  Make sure wordwrap is off.  The third line of the license file will tell you the version.  For example, something like this:</p>
<p><strong>#CITRIXTERM	FEATURE	1.0	CNS_V200_SERVER EN	Citrix NetScaler VPX 200|Server</strong></p>
<p>This means the license I have is for a VPX 200.  If you take a look at the very first line and scroll to the right some, you can see the edition level info under INCREMENT on physical appliances:</p>
<p><strong>CNS_SPE_SERVER</strong></p>
<p>The SPE part means I have a Platinum Edition license.  Standard Edition would be CNS_SSE_SERVER and Enterprise Edition would be CNS_SEE_SERVER.</p>
<p>On a VPX virtual appliance, it will never say this.  Instead it will say something like:</p>
<p><strong>CNS_V200_SERVER</strong></p>
<p>which tells you it is a VPX 200, but you have no way of telling the edition.  The only thing you can do to figure out what edition it is by looking at the features available to you and comparing to the the VPX feature matrix <a href="http://www.citrix.com/English/ps2/products/subfeature.asp?contentID=2300450">here</a> or move on to option 3 below.</p>
<p>3. Login to MyCitrix.com and look at the license file there under Manage Assets.  It will tell you which version you have.  But when you have 50-60 Netscalers you might be responsible for, this becomes a bit tedious to wade through.  You could also call Citrix Support and give them your license number and they can tell you what edition your license is but then you have to play the waiting game on the phone with them.  Easier to just login to MyCitrix.com and go through your licenses.</p>
<p>Hope this helps.  Please do post a reply if you have an easier way of identifying your VPX license edition level at a glance.</p>
<p><a href="http://www.jasonsamuel.com/2011/02/25/how-to-tell-what-license-and-edition-you-have-applied-to-a-netscaler-vpx-appliance/">How to tell what license and edition you have applied to a Netscaler VPX appliance</a> is a post from: <a href="http://www.jasonsamuel.com">JasonSamuel.com</a></p>
<p>More of my posts you might like:<ol>
<li><a href='http://www.jasonsamuel.com/2010/06/22/how-to-update-your-citrix-netscaler-firmware/' rel='bookmark' title='How to update your Citrix Netscaler firmware'>How to update your Citrix Netscaler firmware</a></li>
<li><a href='http://www.jasonsamuel.com/2010/08/05/how-to-create-and-link-an-ssl-certificate-chain-for-a-citrix-netscaler/' rel='bookmark' title='How to create and link an SSL certificate chain for a Citrix Netscaler'>How to create and link an SSL certificate chain for a Citrix Netscaler</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.jasonsamuel.com/2011/02/25/how-to-tell-what-license-and-edition-you-have-applied-to-a-netscaler-vpx-appliance/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to create and link an SSL certificate chain for a Citrix Netscaler</title>
		<link>http://www.jasonsamuel.com/2010/08/05/how-to-create-and-link-an-ssl-certificate-chain-for-a-citrix-netscaler/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=how-to-create-and-link-an-ssl-certificate-chain-for-a-citrix-netscaler</link>
		<comments>http://www.jasonsamuel.com/2010/08/05/how-to-create-and-link-an-ssl-certificate-chain-for-a-citrix-netscaler/#comments</comments>
		<pubDate>Thu, 05 Aug 2010 17:12:58 +0000</pubDate>
		<dc:creator>Jason Samuel</dc:creator>
				<category><![CDATA[Citrix NetScaler]]></category>
		<category><![CDATA[Citrix]]></category>
		<category><![CDATA[netscaler]]></category>
		<category><![CDATA[SSL certificate]]></category>
		<category><![CDATA[ssl chain]]></category>

		<guid isPermaLink="false">http://www.jasonsamuel.com/?p=611</guid>
		<description><![CDATA[I&#8217;ve covered how to convert an SSL cert to a .pem with a private key for a Netscaler before here but sometimes you might be required to install a full SSL cert chain (read my article here on how SSL certificate chains work). I actually install the full SSL chain (root and intermediate certs) on [...]<p><a href="http://www.jasonsamuel.com/2010/08/05/how-to-create-and-link-an-ssl-certificate-chain-for-a-citrix-netscaler/">How to create and link an SSL certificate chain for a Citrix Netscaler</a> is a post from: <a href="http://www.jasonsamuel.com">JasonSamuel.com</a></p>

More of my posts you might like:<ol>
<li><a href='http://www.jasonsamuel.com/2010/06/22/how-to-update-your-citrix-netscaler-firmware/' rel='bookmark' title='How to update your Citrix Netscaler firmware'>How to update your Citrix Netscaler firmware</a></li>
<li><a href='http://www.jasonsamuel.com/2010/06/02/how-to-install-an-ssl-cert-chain-on-a-cisco-wireless-lan-controller-wlc/' rel='bookmark' title='How to install an SSL cert chain on a Cisco Wireless Lan Controller (WLC)'>How to install an SSL cert chain on a Cisco Wireless Lan Controller (WLC)</a></li>
<li><a href='http://www.jasonsamuel.com/2010/07/09/how-to-monitor-realtime-traffic-stats-accurately-on-a-citrix-netscaler/' rel='bookmark' title='How to monitor realtime traffic stats accurately on a Citrix Netscaler'>How to monitor realtime traffic stats accurately on a Citrix Netscaler</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve covered how to convert an SSL cert to a .pem with a private key for a Netscaler before <a href="http://www.jasonsamuel.com/2010/01/07/how-to-convert-an-ssl-cert-to-a-pem-for-installation-on-citrix-and-cisco-appliances/">here</a> but sometimes you might be required to install a full SSL cert chain (read my article <a href="http://www.jasonsamuel.com/2009/03/12/ssl-certificate-chains-explained/ ">here</a> on how SSL certificate chains work).  I actually install the full SSL chain (root and intermediate certs) on any Netscaler I deploy as a best practice.</p>
<p>  I&#8217;m going to use Network Solutions again in this example but this will work for Verisign, GeoTrust, Thawte, Comodo, or any other CA (certificate authority).</p>
<p>  Here is how you do it on the Netscaler:</p>
<p>  1. I&#8217;m going to assume you have already generated a CSR (either through the appliance or IIS, whatever your preference), had your cert validated, and have downloaded your site cert and intermediate/root certs from Network Solutions since I have covered this before in the articles I mentioned above.</p>
<p>  2. Now just login to your Netscaler, install your website cert that was issued to you first under SSL &gt; Certificates on the Netscaler.</p>
<p>  3. At this point, if your website is publicly available, let&#8217;s examine the cert chain.  Go to <a href="http://www.sslshopper.com/ssl-checker.html">http://www.sslshopper.com/ssl-checker.html </a>and type in your website (if it&#8217;s not publicly available, use OpenSSL which I have written about <a href="http://www.jasonsamuel.com/2010/01/14/a-quick-way-to-troubleshoot-ssl-chain-issues-using-openssl/">here</a>).  Since you have not installed intermediate certs on your Netscaler yet, it should report your SSL cert is good but your SSL cert chain is broken like below:</p>
<p><a href="http://www.jasonsamuel.com/wp-content/uploads/2010/08/broken_ssl_chain_netscaler.gif"><img class="aligncenter size-full wp-image-612" title="broken_ssl_chain_netscaler" src="http://www.jasonsamuel.com/wp-content/uploads/2010/08/broken_ssl_chain_netscaler.gif" alt="" width="765" height="557" /></a>  </p>
<p>4. Now go back to your Netscaler and install the two intermediate certs and one root cert that Network Solutions has give you.  You really only need the intermediate cert but I like to install them all just in case.  They are in .crt format when you get them from Network Solutions and that is fine, no need to convert.  Just go to SSL &gt; Certificates on the Netscaler and click Add in the bottom toolbar.  Give it a name and use Browse (Local) to find your certs and install all 3 one by one.  Here is what it should look like when you are done:  </p>
<p><a href="http://www.jasonsamuel.com/wp-content/uploads/2010/08/netscaler_intermediate_root_certs.gif"><img class="aligncenter size-full wp-image-614" title="netscaler_intermediate_root_certs" src="http://www.jasonsamuel.com/wp-content/uploads/2010/08/netscaler_intermediate_root_certs.gif" alt="" width="1070" height="70" /></a>  </p>
<p>5. Now here comes the most important part.  You need to link the intermediate cert (NetworkSolutions_CA) to your site&#8217;s SSL cert.  Right click on your site&#8217;s SSL cert and hit &#8220;Link&#8221;.  Now choose the NetworkSolutions_CA cert in the drop down box and press OK.  It will confirm the cert is now linked.  The Netscaler actually supports up to a 10 cert chain so you can have your website cert + 9 more intermediate certs linked to it if you want.  So feel free to link more if you need to at this point.  You can also click on the &#8220;Cert Links&#8221; button in the bottom toolbar and it will show you all your links.  For example, here is a Netscaler with 3 certs from Network Solutions that have been linked to the &#8220;NetworkSolutions_CA&#8221; cert:  </p>
<p><a href="http://www.jasonsamuel.com/wp-content/uploads/2010/08/netscaler_with_certificate_links.gif"><img class="aligncenter size-full wp-image-616" title="netscaler_with_certificate_links" src="http://www.jasonsamuel.com/wp-content/uploads/2010/08/netscaler_with_certificate_links.gif" alt="" width="315" height="292" /></a>  </p>
<p>6. Now go back to <a href="http://www.sslshopper.com/ssl-checker.html">http://www.sslshopper.com/ssl-checker.html</a> and try your domain again.  This time it will say your SSL chain is good:  </p>
<p><a href="http://www.jasonsamuel.com/wp-content/uploads/2010/08/netscaler_SSL_chain.gif"><img class="aligncenter size-full wp-image-617" title="netscaler_SSL_chain" src="http://www.jasonsamuel.com/wp-content/uploads/2010/08/netscaler_SSL_chain.gif" alt="" width="735" height="380" /></a>  </p>
<p>Here&#8217;s an example where I linked each intermediate cert chain all the way down to the root certificate.  I would recommend you link all your certs down to the root as a best practice:</p>
<p> <a href="http://www.jasonsamuel.com/wp-content/uploads/2010/08/netscaler_full_ssl_chain.gif"><img class="aligncenter size-full wp-image-633" title="netscaler_full_ssl_chain" src="http://www.jasonsamuel.com/wp-content/uploads/2010/08/netscaler_full_ssl_chain.gif" alt="" width="721" height="749" /></a>  </p>
<p>Also, Citrix put together this really good guide on SSL cert chains I am hosting here for you.  It&#8217;s a great read with plenty of screenshots so take a look: </p>
<p><a href="http://www.jasonsamuel.com/wp-content/uploads/2010/08/Citrix_VerisignNetScaler_DepGuide.pdf">Citrix_Verisign_NetScaler_SSL_Cert_Deployment_Guide</a></p>
<p>  <a href="http://www.jasonsamuel.com/wp-content/uploads/2010/08/Citrixlabs_Verisign.jpg"><img class="aligncenter size-medium wp-image-619" title="Citrixlabs_Verisign" src="http://www.jasonsamuel.com/wp-content/uploads/2010/08/Citrixlabs_Verisign-298x300.jpg" alt="" width="298" height="300" /></a></p>
<p><a href="http://www.jasonsamuel.com/2010/08/05/how-to-create-and-link-an-ssl-certificate-chain-for-a-citrix-netscaler/">How to create and link an SSL certificate chain for a Citrix Netscaler</a> is a post from: <a href="http://www.jasonsamuel.com">JasonSamuel.com</a></p>
<p>More of my posts you might like:<ol>
<li><a href='http://www.jasonsamuel.com/2010/06/22/how-to-update-your-citrix-netscaler-firmware/' rel='bookmark' title='How to update your Citrix Netscaler firmware'>How to update your Citrix Netscaler firmware</a></li>
<li><a href='http://www.jasonsamuel.com/2010/06/02/how-to-install-an-ssl-cert-chain-on-a-cisco-wireless-lan-controller-wlc/' rel='bookmark' title='How to install an SSL cert chain on a Cisco Wireless Lan Controller (WLC)'>How to install an SSL cert chain on a Cisco Wireless Lan Controller (WLC)</a></li>
<li><a href='http://www.jasonsamuel.com/2010/07/09/how-to-monitor-realtime-traffic-stats-accurately-on-a-citrix-netscaler/' rel='bookmark' title='How to monitor realtime traffic stats accurately on a Citrix Netscaler'>How to monitor realtime traffic stats accurately on a Citrix Netscaler</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.jasonsamuel.com/2010/08/05/how-to-create-and-link-an-ssl-certificate-chain-for-a-citrix-netscaler/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Getting around Netscaler Client IP issues without having to use USIP</title>
		<link>http://www.jasonsamuel.com/2010/07/16/getting-around-netscaler-client-ip-issues-without-having-to-use-usip/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=getting-around-netscaler-client-ip-issues-without-having-to-use-usip</link>
		<comments>http://www.jasonsamuel.com/2010/07/16/getting-around-netscaler-client-ip-issues-without-having-to-use-usip/#comments</comments>
		<pubDate>Fri, 16 Jul 2010 21:58:01 +0000</pubDate>
		<dc:creator>Jason Samuel</dc:creator>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[Citrix NetScaler]]></category>
		<category><![CDATA[IIS]]></category>
		<category><![CDATA[Citrix]]></category>
		<category><![CDATA[netscaler]]></category>

		<guid isPermaLink="false">http://www.jasonsamuel.com/?p=552</guid>
		<description><![CDATA[If you work with Netscalers, you already know how SNIPs and MIPs work. They are the IPs that communicate with your servers. Every packet from the outside world that passes through the Netscaler will hit your server as though it was coming from this IP. This is the default behavior on a Netscaler. Unfortunately if [...]<p><a href="http://www.jasonsamuel.com/2010/07/16/getting-around-netscaler-client-ip-issues-without-having-to-use-usip/">Getting around Netscaler Client IP issues without having to use USIP</a> is a post from: <a href="http://www.jasonsamuel.com">JasonSamuel.com</a></p>
]]></description>
			<content:encoded><![CDATA[<p>If you work with Netscalers, you already know how SNIPs and MIPs work.  They are the IPs that communicate with your servers.  Every packet from the outside world that passes through the Netscaler will hit your server as though it was coming from this IP.  This is the default behavior on a Netscaler.</p>
<p><a href="http://www.jasonsamuel.com/wp-content/uploads/2010/07/citrix_netscaler_in_action.jpg"><img src="http://www.jasonsamuel.com/wp-content/uploads/2010/07/citrix_netscaler_in_action.jpg" alt="" title="citrix_netscaler_in_action" width="410" height="287" class="aligncenter size-full wp-image-572" /></a></p>
<p>Unfortunately if your servers require the client&#8217;s true IP address, all you will see for every client will be the SNIP or MIP address you are using.  Here are a few examples I have personally had to deal with:</p>
<p>- IIS requires client IP for IIS logs<br />
- IIS requires client IP for ACL filtering<br />
- Web application requires client IP for it&#8217;s own logging purposes<br />
- Web application requires cilent IP for authentication</p>
<p>Now to get around this for IIS, you can install ISAPI filters and set your Netscaler to use a custom header to store the true client IP address and pass that along with every packet.  The ISAPI filter in IIS would look for this particular header and log that instead of the SNIP/MIP.  There&#8217;s a very nice Client IP extraction ISAPI filter with some great instructions located on this page from Citrix or you can even write your own:</p>
<p><a href="http://support.citrix.com/article/CTX119347">http://support.citrix.com/article/CTX119347</a></p>
<p>This is great for logging but sometimes your web application may grab the IP address from web server variables.  To return the IP address of the host making the request, the server variable that your ASP, ASP.NET, and PHP code will call is &#8220;REMOTE_ADDR&#8221;.  Unfortunately REMOTE_ADR is going to have your SNIP IP and not the client IP when passing through the Netscaler.  The good news is that if you have control of your code, you can make it call from a different location that includes the client IP your ISAPI filter is passing.  So if your code currently uses:</p>
<p><code>Request.ServerVariables(&quot;REMOTE_ADDR&quot;)</code></p>
<p>then switch it to:</p>
<p><code>Request.ServerVariables(&quot;http_client_ip&quot;)</code></p>
<p>where &#8220;http_client_ip&#8221; is the real client IP address and not the SNIP.  Everything will work fine after that.</p>
<p>Here&#8217;s a nice snippet of code you can run on your web server and hit from your client browser to see what all the Netscaler is passing to the server:</p>
<p><pre><code>
&lt;html/&gt;
&lt;body/&gt;
&lt;p/&gt;
NS SNIP or MIP IP address:
&lt;%Response.Write(Request.ServerVariables(&quot;remote_addr&quot;))%&gt;
&lt;br/&gt;
&lt;b/&gt;The NS Inserted Client IP:&lt;/b/&gt;
&lt;%Response.Write(Request.ServerVariables(&quot;http_Client_ip&quot;))%&gt;
&lt;br/&gt;
Accept Encoding:
&lt;%Response.Write(Request.ServerVariables(&quot;HTTP_ACCEPT_ENCODING&quot;))%&gt;
&lt;br/&gt;
Cookies:
&lt;%Response.Write(Request.ServerVariables(&quot;HTTP_COOKIE&quot;))%&gt;
&lt;br/&gt;
&lt;/body/&gt;
&lt;/html/&gt;
</code></pre></p>
<p>(<strong>***Note</strong>, I apologize in advance if WordPress messes up the code block above.  It usually changes the quotes in the code around so if you have issues with it, I will host a .txt file here with the code.  Just comment to this post if you need it.)</p>
<p>This is all well and good when you have access to the code and can make this change but what about web apps that are 3rd party and you cannot modify the code?  Well then you have no choice but to use the USIP (Use Source IP) feature on the Netscaler.  What this does is pass the client IP straight through the Netscaler to your backend server so that the SNIP or MIP you are using on your Netscaler is never seen by the server (except for monitor probes from the Netscaler itself of course).  This option is disabled by default.  It can be applied to the entire Netscaler or turned on and off per service.</p>
<p>Best practice is not to use it and avoid it as much as possible.  The reason is that using the USIP feature means you are going to lose very important features on the Netscaler such as connection multiplexing and surge protection.  It&#8217;s always better to use the Client IP header insertion instead.  In fact to date I have personally never enabled USIP in any environment I have built so far.</p>
<p>Here&#8217;s a very excellent and recent article from Citrix on the pros and cons of using USIP mode:</p>
<p><a href="http://support.citrix.com/article/CTX121974">http://support.citrix.com/article/CTX121974</a></p>
<p>I hope this helps anyone trying to get around Client IP address related issues.  Please feel free to post a comment on your own experiences or suggestions.</p>
<p><a href="http://www.jasonsamuel.com/2010/07/16/getting-around-netscaler-client-ip-issues-without-having-to-use-usip/">Getting around Netscaler Client IP issues without having to use USIP</a> is a post from: <a href="http://www.jasonsamuel.com">JasonSamuel.com</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.jasonsamuel.com/2010/07/16/getting-around-netscaler-client-ip-issues-without-having-to-use-usip/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>How to monitor realtime traffic stats accurately on a Citrix Netscaler</title>
		<link>http://www.jasonsamuel.com/2010/07/09/how-to-monitor-realtime-traffic-stats-accurately-on-a-citrix-netscaler/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=how-to-monitor-realtime-traffic-stats-accurately-on-a-citrix-netscaler</link>
		<comments>http://www.jasonsamuel.com/2010/07/09/how-to-monitor-realtime-traffic-stats-accurately-on-a-citrix-netscaler/#comments</comments>
		<pubDate>Fri, 09 Jul 2010 17:07:45 +0000</pubDate>
		<dc:creator>Jason Samuel</dc:creator>
				<category><![CDATA[Citrix NetScaler]]></category>
		<category><![CDATA[Citrix]]></category>
		<category><![CDATA[connectiontable]]></category>
		<category><![CDATA[netscaler]]></category>
		<category><![CDATA[nsconmsg]]></category>

		<guid isPermaLink="false">http://www.jasonsamuel.com/?p=504</guid>
		<description><![CDATA[The GUI on a Citrix Netscaler is nice but it takes 7 seconds to update and sometimes you need live stats and a 7 second delay is not going to work for you. You can do A LOT through command line you can&#8217;t through the GUI (isn&#8217;t that the case with pretty much anything though? [...]<p><a href="http://www.jasonsamuel.com/2010/07/09/how-to-monitor-realtime-traffic-stats-accurately-on-a-citrix-netscaler/">How to monitor realtime traffic stats accurately on a Citrix Netscaler</a> is a post from: <a href="http://www.jasonsamuel.com">JasonSamuel.com</a></p>

More of my posts you might like:<ol>
<li><a href='http://www.jasonsamuel.com/2010/06/22/how-to-update-your-citrix-netscaler-firmware/' rel='bookmark' title='How to update your Citrix Netscaler firmware'>How to update your Citrix Netscaler firmware</a></li>
<li><a href='http://www.jasonsamuel.com/2010/06/22/how-to-reset-a-citrix-netscaler-back-to-factory-defaults/' rel='bookmark' title='How to reset a Citrix Netscaler back to factory defaults'>How to reset a Citrix Netscaler back to factory defaults</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>The GUI on a Citrix Netscaler is nice but it takes 7 seconds to update and sometimes you need live stats and a 7 second delay is not going to work for you.  You can do A LOT through command line you can&#8217;t through the GUI (isn&#8217;t that the case with pretty much anything though? <img src='http://www.jasonsamuel.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> ).   I am writing this article to show you how to get stats on each of your VIPS and servers quickly and also monitor live connections and traffic into your appliance.</p>
<p>&nbsp;</p>
<p><a href="http://www.jasonsamuel.com/wp-content/uploads/2010/06/citrix-netscaler.jpg"><img src="http://www.jasonsamuel.com/wp-content/uploads/2010/06/citrix-netscaler.jpg" alt="" title="citrix-netscaler" width="313" height="90" class="aligncenter size-full wp-image-460" /></a></p>
<p>&nbsp;</p>
<p><strong>GETTING DETAILS</strong><br />
First, you might want to get some details on your Load Balanced VIP.  I am calling my Load Balanced VIP &#8220;lb_vsvr_name&#8221; in this example.  Here is how you do that:</p>
<p>1. SSH into the Netscaler using Putty<br />
2. Type:</p>
<p><code>sh lb vserver lb_vsvr_name</code></p>
<p>You will immediately see a lot of stats on how this VIP is configured like it&#8217;s IP, it&#8217;s status, connection method, persistency, bound service groups, etc.  Pay attention to the bound service groups.  So to get details on one of those, type this where &#8220;svcgrp_name&#8221; is the name of your service group:</p>
<p>3. Now type:</p>
<p><code>sh servicegroup svcgrp_name</code></p>
<p>This will show you details on the service group such as the status and the individual back end servers.  Let&#8217;s say you have two servers called &#8220;svr_name1&#8243; and &#8220;svr_name2&#8243;.  To get the details on those backend servers:</p>
<p>4. Type:</p>
<p><code>sh server svr_name1</code></p>
<p>and</p>
<p><code>sh server svr_name2</code></p>
<p>This will pull up stats on each of your backend servers.</p>
<p>&nbsp;</p>
<p><strong>GETTING REALTIME GENERAL PERFORMANCE STATS</strong><br />
1. Make sure you are still SSHed into the Netscaler using Putty<br />
2. Type &#8220;shell&#8221; to enter the FreeBSD shell<br />
3. Capitalization matters below or you will get an error. Type:</p>
<p><code>nsconmsg -s ConLB=2 -d oldconmsg</code></p>
<p>What this does is pull up realtime general stats on all your VIPs and services and continues to update it every 7 seconds until your press Ctrl+C to stop it. I know the display has a ton of info in it but Citrix actually has some very good documentation on how to read it all here:  <a href="http://support.citrix.com/article/CTX113341">http://support.citrix.com/article/CTX113341</a></p>
<p>&nbsp;</p>
<p><strong>GETTING REALTIME TRAFFIC &amp; CONNECTION STATS</strong><br />
Now that you have verified the VIP is up and have it&#8217;s IP and bound service groups.  Here is how you can SSH into the Netscaler and get live traffic and connection stats for the VIP itself:</p>
<p>1. Make sure you are still SSHed into the Netscaler using Putty<br />
2. Make sure you are not in the shell.  Type &#8220;exit&#8221; if you are still in it from doing the previous section.<br />
3. Now type:</p>
<p><code>shconnectiontable</code></p>
<p>This will give you every connection coming into the Netscaler.  The columns displayed are in this order:</p>
<p>SRCIP = source IP address<br />
SRCPORT = source port<br />
DSTIP = destination IP address<br />
DSTPORT = destination port<br />
SVCTYPE = service type like HTTP, SSL, etc.<br />
IDLTIME = idle time of that connection in milliseconds<br />
STATE = current state of the connection, you will usually see it either waiting or established</p>
<p>Pretty hard to look at if the device you are looking at is in production and has a ton of traffic on it.  So we need to filter this display.  Let&#8217;s just look at how many connections we have to just one of the backend servers above.  Type:</p>
<p><code>sh connectiontable | grep xxx.xxx.xxx.xx</code></p>
<p>or</p>
<p><code>sh connectionable &quot;ip == xxx.xxx.xxx.xx&quot;</code></p>
<p>where xxx.xxx.xxx.xxx is the IP address of one of the backend servers above.  This will give you stats on all the connections to that backend server.</p>
<p>1. Anything that says &#8220;MONITOR&#8221; is the Netscaler itself testing for uptime so ignore those.<br />
2. If you see &#8220;MONITORS&#8221;, ignore those too, they are just SSL based monitors.<br />
3. If you see &#8220;HTTP&#8221; or &#8220;SSL&#8221;, that&#8217;s the real traffic you are after.  Note if they say &#8220;TIME_WAIT&#8221; or &#8220;ESTABLISHED&#8221;.  If it&#8217;s live traffic, the state should be an established connection.</p>
<p>Let&#8217;s get into some more advanced filtering.  Let&#8217;s say you want to filter all monitors to that IP and only display SSL, HTTP, etc:</p>
<p><code>sh connectiontable &quot;ip == xxx.xxx.xxx.xxx &amp;&amp; svctype != MONITOR&quot;</code></p>
<p>Let&#8217;s say you want to see all traffic to that IP but only established connections.  Here is the syntax for that:</p>
<p><code>sh connectiontable &quot;ip == xxx.xxx.xxx.xxx &amp;&amp; state == established&quot;</code></p>
<p>Let&#8217;s say I want all the traffic to that IP, established connections only, and only display SSL connections:</p>
<p><code>sh connectiontable &quot;ip == xxx.xxx.xxx.xxx &amp;&amp; state == established &amp;&amp; svctype == SSL&quot;</code></p>
<p>&nbsp;</p>
<p>One thing to note, typically you can filter additional service types like this:</p>
<p><code>sh connectiontable &quot;ip == xxx.xxx.xxx.xxx &amp;&amp; svctype != MONITOR &amp;&amp; svctype != SSL&quot;</code></p>
<p>but I found that if you have &#8220;MONITORS&#8221; and you wanted to filter them, it does not work and gives you an error saying it&#8217;s an invalid command. I actually have an open ticket with Citrix about this bug so it should be fixed in a future release.  In the meantime, just use a combination of a filter expression and grep to filter it out.  Here&#8217;s an example:</p>
<p><code>sh connectiontable &quot;ip == xxx.xxx.xxx.xxx &amp;&amp; svctype != MONITOR&quot; | grep -v MONITORS</code></p>
<p>&nbsp;</p>
<p><strong>FURTHER READING</strong><br />
If you need further info on commands and syntax available on the Netscaler, I have hosted the Citrix Netscaler Command Reference Guide for 9.1 here:</p>
<p><a href='http://www.jasonsamuel.com/wp-content/uploads/2010/07/NS-CommandReference-Guide.pdf'>NS-CommandReference-Guide.pdf</a></p>
<p>Yes it&#8217;s 1742 pages but take the time to flip through it.  It&#8217;s extremely powerful. The connectiontable related syntax begins on page 883 (873 in the guide). <img src='http://www.jasonsamuel.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><a href="http://www.jasonsamuel.com/2010/07/09/how-to-monitor-realtime-traffic-stats-accurately-on-a-citrix-netscaler/">How to monitor realtime traffic stats accurately on a Citrix Netscaler</a> is a post from: <a href="http://www.jasonsamuel.com">JasonSamuel.com</a></p>
<p>More of my posts you might like:<ol>
<li><a href='http://www.jasonsamuel.com/2010/06/22/how-to-update-your-citrix-netscaler-firmware/' rel='bookmark' title='How to update your Citrix Netscaler firmware'>How to update your Citrix Netscaler firmware</a></li>
<li><a href='http://www.jasonsamuel.com/2010/06/22/how-to-reset-a-citrix-netscaler-back-to-factory-defaults/' rel='bookmark' title='How to reset a Citrix Netscaler back to factory defaults'>How to reset a Citrix Netscaler back to factory defaults</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.jasonsamuel.com/2010/07/09/how-to-monitor-realtime-traffic-stats-accurately-on-a-citrix-netscaler/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>How to reset a Citrix Netscaler back to factory defaults</title>
		<link>http://www.jasonsamuel.com/2010/06/22/how-to-reset-a-citrix-netscaler-back-to-factory-defaults/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=how-to-reset-a-citrix-netscaler-back-to-factory-defaults</link>
		<comments>http://www.jasonsamuel.com/2010/06/22/how-to-reset-a-citrix-netscaler-back-to-factory-defaults/#comments</comments>
		<pubDate>Tue, 22 Jun 2010 23:14:51 +0000</pubDate>
		<dc:creator>Jason Samuel</dc:creator>
				<category><![CDATA[Citrix NetScaler]]></category>
		<category><![CDATA[Citrix]]></category>
		<category><![CDATA[netscaler]]></category>

		<guid isPermaLink="false">http://www.jasonsamuel.com/?p=449</guid>
		<description><![CDATA[On older Netscaler appliances, the command to clear your Netscaler configuration and reset it to factory defaults used to be: clear config –c y But on newer devices, the command is: clear ns config level where level is one of the following: 1. basic &#8211; which clears everything except NSIP, MIPs, SNIPs, network settings, HA, [...]<p><a href="http://www.jasonsamuel.com/2010/06/22/how-to-reset-a-citrix-netscaler-back-to-factory-defaults/">How to reset a Citrix Netscaler back to factory defaults</a> is a post from: <a href="http://www.jasonsamuel.com">JasonSamuel.com</a></p>

More of my posts you might like:<ol>
<li><a href='http://www.jasonsamuel.com/2010/06/22/how-to-update-your-citrix-netscaler-firmware/' rel='bookmark' title='How to update your Citrix Netscaler firmware'>How to update your Citrix Netscaler firmware</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>On older Netscaler appliances, the command to clear your Netscaler configuration and reset it to factory defaults used to be: </p>
<p>clear config –c y</p>
<p>But on newer devices, the command is:</p>
<p>clear ns config level</p>
<p>where level is one of the following:</p>
<p>1. basic &#8211; which clears everything except NSIP, MIPs, SNIPs, network settings, HA, features, and the nsroot account</p>
<p>2. extended &#8211; which clears everything except NSIP, MIPs, SNIPs, network settings, &#038; HA</p>
<p>3. full &#8211; which clears everything except teh NSIP and default gateway</p>
<p>So typically, I type this to do a full wipe:</p>
<p>clear ns config full</p>
<p>You can also do this through the GUI by going to System > Diagnostics > Maintenance > Clear Configuration.  Use the drop down box to select basic, extended, or full then click the Run button.</p>
<p>With that said, I have run across newer devices (even running NS 9.1 and newer) that just don&#8217;t clear all their config info.  For those, I have just done the following to reset:</p>
<p>1. SSH using Putty into the Netscaler and login<br />
2. Type &#8220;shell&#8221; to enter shell<br />
3. cd /nsconfig<br />
4. Rename the configuration by typing &#8220;mv ns.conf ns.conf.bak&#8221;<br />
5. Type reboot</p>
<p>This should reset the device to the IP of 192.168.100.1 with the nsroot/nsroot account credentials.  Your licenses and SSL certs will remain though since these are files and not part of the Netscaler config.  You will have to delete them manually via WinSCP.</p>
<p>UPDATE 6/29/10:  To completely reset your Netscaler to &#8220;factory new&#8221; conditions, it&#8217;s a little bit more work but I have outlined the procedure here:</p>
<p><a href="http://www.jasonsamuel.com/2010/06/29/how-to-really-set-a-netscaler-back-to-factory-defaults-factory-new-condition/">http://www.jasonsamuel.com/2010/06/29/how-to-really-set-a-netscaler-back-to-factory-defaults-factory-new-condition/</a></p>
<p><a href="http://www.jasonsamuel.com/2010/06/22/how-to-reset-a-citrix-netscaler-back-to-factory-defaults/">How to reset a Citrix Netscaler back to factory defaults</a> is a post from: <a href="http://www.jasonsamuel.com">JasonSamuel.com</a></p>
<p>More of my posts you might like:<ol>
<li><a href='http://www.jasonsamuel.com/2010/06/22/how-to-update-your-citrix-netscaler-firmware/' rel='bookmark' title='How to update your Citrix Netscaler firmware'>How to update your Citrix Netscaler firmware</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.jasonsamuel.com/2010/06/22/how-to-reset-a-citrix-netscaler-back-to-factory-defaults/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Served from: www.jasonsamuel.com @ 2012-02-06 17:07:52 -->
