I am getting this error message after copying my ArcGIS 10.4 VS 2015 console application to the server development.
Error HRESULT E_FAIL has been returned from a call to a COM component.
Found the problem.
The SDE connection string was using a different account in the development server and in my desktop.
Very generic error, not easy to find. I had to all Console.Writeline in several places in the source code to find the issue.
Retrieving data ...