Metadata contains a reference that cannot be resolved : ‘https://disco.crm8.dynamics.com/ XRMServices/2011/Discovery.svc?wsdl&sdkversion=9’.

Metadata contains a reference that cannot be resolved: ‘https://disco.crm8.dynamics.com/XRMServices/2011/Discovery.svc?wsdl&sdkversion=9’

This error is facing while connecting to dynamics crm from console application because this problem occurs when the client computer cannot send an HTTP request. The client computer cannot send the HTTP request because the connection has been closed or is unavailable. And Today I realize that My DB server was using TLS1.2 not SSL as a protocol to connect to CRM App Server, so when making a connection from DB to CRM via console app, I must explicitly set the TLS version on the ServicePointManager. Just have this code run anytime before you make the call to CRM organization service.

ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12

To check just i have opened the chrome browser and check the certificate information. Its clearly stating protocal is TLS not SSL.

TLS1.2.png

Hope it helps.

Enjoy 🙂

Advertisements

Hide FormSelector

Hide FormSelector :

Sometimes will get the requirement to hide the from selector.

If an entity has one or more multiple forms then we need to hide the from selector. Paste the below code in form load. It will work.

This code is Microsoft unsupported code but still, it will work.

function hideformselector(){

document.getElementById(“formselectorcontainer”).style.display = “none”;

}

That’s It. Enjoy 🙂