Thursday, August 18, 2016

StoreFront / Gateway Logoff Error

On occasion you may run into logoff errors for Citrix StoreFront or Citrix NetScaler Gateway similar to the one below.
If any apps are still running, please exit them manually.

I have found two reasons thus for this error to potentially happen. Each has their own time and place as well as a resolution. There is a third resolution as well, that was a bug several years ago with VDI-In-A-Box. This third resolution is actually a workaround, and depending on your environment, may not be suitable.




Scenario/Fix 1

  • In this scenario Receiver for Web is configured for domain pass-through authentication. If this or smart card authentication are in use and XenDesktop Site settings are not configured to trust XML communications (default config) then the error above can be observed.
  1. Load PowerShell on a Delivery Controller
  2. Add the Citrix cmdlets:
    Add-PSSnapin *cit*
  3. View your Site information. It is expected that the trust status is false:
    Get-BrokerSite
  4. Adjust your trust status:
    Set-BrokerSite -TrustRequestsSentToTheXmlServicePort $true
  5. Verify you are now trusted for XML communication:
    Get-BrokerSite


Scenario/Fix 2
  • In this scenario StoreFront is configured for multiple Delivery Controllers across different Sites. One of the sites is down resulting in no Delivery Controller to respond. This will usually be seen in the Event Viewer>Citrix Delivery Services log on StoreFront servers as Event ID 4012. Both the enumeration process and the logoff process (if terminating or disconnecting sessions) will reach out to all configured sites in StoreFront. While enumeration does not present an error to users, log off will do so if StoreFront cannot verify active sessions to disconnect or terminate. This could be very common in Cold DR or Development environment scenarios where everything is passed through one StoreFront portal.
  1. Verify all XenDesktop sites are responding.


Scenario/Fix 3
  • This scenario is not actually a scenario but a work around. As alluded to in the second section above, the error occurs when StoreFront tries to utilize WorkSpace Control and disconnect or log off users sessions but fails. This fix for this is to change your default behavior.
  1. In current versions (3.5 or newer) of StoreFront, launch the console and navigate to Receiver for Web Sites>Manage Receiver for Web Sites>Configure.
  2. Select WorkSpace Control
  3. Change the Logoff action to None:
  4. With the setting at None, no controllers will be contacted and thus no errors shown to the client.
  5. Don't forget to replicate settings to your Server Group.
If you are on a version of StoreFront that does no have GUI configurable WorkSpace Control settings, you can access the web.config file in your IIS home and change the highlighted line below.

Go to C:\inetpub\wwwroot\Citrix\<StoreName>Web and open the web.config file.

<workspaceControl enabled="true" autoReconnectAtLogon="true"
            logoffAction="none" showReconnectButton="false" showDisconnectButton="false" />

No comments:

Post a Comment