Unable to RDP Windows Server.

Unable to take RDP.

Event log details:
Type : Error
Source : TermDD
Category : None
Event ID : 50

The RDP protocol component X.224 detected an error in the protocol stream and has disconnected the

I recently got an issue with one of the Citrix servers. None was able to take RDP and while checking the event log through the ILO, I found the above error. I found that the issue was with the terminal service certification. The below mentioned steps were performed to resolve the issue.

1. Make sure that the terminal server registry has been successfully backed up.
2. Start Registry Editor.
3. Locate and then click the following registry subkey: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\TermService\Parameters
4. On the Registry menu, click Export Registry File.
5. Type exported-parameters in the File name box, and then click Save.

NOTE: If you have to restore this registry subkey in the future, double-click the Exported-parameters.reg file that you saved in this step.
6. Under the Parameters registry subkey, right-click each of the following values, click Delete, and then click Yes to confirm the deletion:
X509 Certificate
X509 Certificate ID
7. Quit Registry Editor, and then restart the server.