![]() |
#3 |
Участник
|
CrmAuthenticationToken token = new CrmAuthenticationToken();
token.OrganizationName = ConfigurationManager.AppSettings["OrgName"]; token.AuthenticationType = 0; CrmService service = new CrmService(); string user = ConfigurationManager.AppSettings["CrmUser"]; string password = ConfigurationManager.AppSettings["CrmPassword"]; string domain = ConfigurationManager.AppSettings["CrmDomain"]; service.Credentials = new NetworkCredential(user, password, domain); service.PreAuthenticate = true;//System.Net.CredentialCache.DefaultCredentials; service.Url = ConfigurationManager.AppSettings["CrmServiceUrl"]; service.CrmAuthenticationTokenValue = token; return service; |
|
|
|