Metadata contains a reference that cannot be resolved.

Hi Team,

When trying to connect  to Dynamics 365  from a console application.(using C# code).

For 9 hours below error occurred. After that time code started working properly without making any change in code.

Error Message: 

 Connectivity to CDAX CRM has failed:  System.InvalidOperationException: Metadata contains a reference that cannot be resolved: 'https://login.external.hp.com/pf/sts_mex.ping?PartnerSpId=urn:federation:MicrosoftOnline'. ---> System.Net.WebException: The remote server returned an error: (400) Bad Request.

Does anyone know what causes this issue? 

Regards,

Jithisha