I have a problem when try to connect to MS CRM v9
I used this code to connect:
Uri organizationUri = new Uri(OrgUrl);
AuthenticationCredentials authCredentials = new AuthenticationCredentials();
authCredentials.ClientCredentials.UserName.UserName = UserName;
authCredentials.ClientCredentials.UserName.Password = Password;
OrganizationServiceProxy organizationProxy = new OrganizationServiceProxy(organizationUri, null, authCredentials.ClientCredentials, null);
organizationProxy.EnableProxyTypes();`
var _service = organizationProxy;
This is the Exception message
HResult=-2146233079 Message=Metadata contains a reference that cannot be resolved: 'https://myOrg.api.crm4.dynamics.com/XRMServices/2011/Organization.svc?wsdl&sdkversion=9'. InnerException: HResult=-2146233079 Message=The underlying connection was closed: An unexpected error occurred on a send. InnerException: HResult=-2146232800 Message=Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host. InnerException: ErrorCode=10054 HResult=-2147467259 Message=An existing connection was forcibly closed by the remote host
Did anyone face this problem before. PS: this code is running before in the same project