CRM2011 实例IOrganizationService
#region 初始化Service public IOrganizationService GetOrganizationService() { Uri uri = new Uri(serUrl + "/XRMServices/2011/Organization.svc"); System.ServiceModel.Description.ClientCredentials credentials = new ClientCredentials(); credentials.Windows.ClientCredential = new System.Net.NetworkCredential(userName, password, domain); // credentials.Windows.ClientCredential = CredentialCache.DefaultNetworkCredentials; OrganizationServiceProxy foa = new OrganizationServiceProxy(uri, null, credentials, null); IOrganizationService service = (IOrganizationService)foa; return service; }
posted on 2012-10-19 14:58 HelloHongfu 阅读(390) 评论(0) 编辑 收藏 举报