Attempting to launch a NetScaler published Citrix XenDesktop / XenDesktop application or desktop fails with: “(Unknown client error 0).”

Problem

You attempt to launch a NetScaler published Citrix XenDesktop / XenDesktop application or desktop but immediately receive the following error for the desktop:

The connection to “XenApp Desktop” failed with status (Unknown client error 0).

Launching an application fails with the following message:

Unable to launch your application. Contact your help desk with the following information:

Cannot connect to the Citrix XenApp server.Protocol Driver error

Solution

In the case of this environment, there were 2 issues.

#1 – Certificate on Delivery Controller expired

Reviewing the event logs on the Delivery Controller indicated that the certificate bounded to IIS has expired:

An SSL connection could not be established: The server sent an expired security certificate. The certificate *.domain.int is valid from 10/27/2016 1:45:38 PM until 10/27/2018 1:45:38 PM.. This message was reported from the Citrix XML Service at address https://svr-ctxdc-02.domain.int/scripts/ctxsta.dll[UnknownRequest]. The specified Secure Ticket Authority could not be contacted and has been temporarily removed from the list of active services.

Log Name: Citrix Delivery Services

Source: Citrix Store Service

Event ID: 0

Level: Error

#2 – There were no STAs defined for the NetScaler Virtual Server

Reviewing the settings on the NetScaler virtual server also showed that there were no STAs defined:

Notice how Published Applications was an option on the right side of the Advanced Settings options.

Configuring the appropriate STAs (the Delivery Controllers) should correct the issue: