ClientCredentials creds = new ClientCredentials();
// Credentials
creds.UserName.UserName = userName;
creds.UserName.Password = password;
OrganizationServiceProxy service = new OrganizationServiceProxy(new Uri(orgURL), null, creds, null);
service.Timeout = new TimeSpan(0, 5, 0);
//service.EnableProxyTypes();
return (IOrganizationService)service;
|
then changed to the below and it works fine... :)
ClientCredentials creds = new ClientCredentials();
// Credentials
creds.Windows.ClientCredential = new System.Net.NetworkCredential(userName, password, domain);
OrganizationServiceProxy service = new OrganizationServiceProxy(new Uri(orgURL), null, creds, null);
service.Timeout = new TimeSpan(0, 5, 0);
//service.EnableProxyTypes();
return (IOrganizationService)service;
|
Hi,Thanks for sharing this useful piece of content with us...Keep updating regularly..looking forward to see your further posts. CRM Services
ReplyDeleteDigital Payment Platform
PHP Services
Ecommerce Service Provider