Hi guys,,
I'm trying to create web service (ASMX) to connect with the D365.
But when I'm trying to connect to the D365, I got this error message :-

I tried to change the DLL to the latest version but still gave me same error. For more details about my code :-
public class CRMConnection
{
public OrganizationServiceProxy service;
private ClientCredentials credentials;
private String UserName = WebConfigurationManager.AppSettings["CRM_Username"];
private String Password = WebConfigurationManager.AppSettings["CRM_Password"];
public CRMConnection()
{
Uri OrganizationUri = new Uri(WebConfigurationManager.AppSettings["CRM_URL"]);
credentials = new ClientCredentials();
credentials.UserName.UserName = UserName;
credentials.UserName.Password = Password;
service = new OrganizationServiceProxy(OrganizationUri, null, credentials, null);
this.service = service;
}
}
Error comes in this line :
service = new OrganizationServiceProxy(OrganizationUri, null, credentials, null);
Note : I used same code with other project (Windows Application) and it's working fine.
Your help in this regard will be highly appreciated!
Thanks ..
*This post is locked for comments
I have the same question (0)