I know this is an old thread, but I don't see anything more recent and relevant, so I'm adding to it.
I had this exact error when attempting to log into ESXi 6.0 from the vsphere client, and was able to resolve it by ensuring that the TMP/TEMP folders were available. In my case they were not, due to those folders being on a RAM disk that is not reliably created when Windows boots on this machine.