我只是说要学习xRM。在大部分时间里,我将从我的工作网络之外的工作。(由于许多原因,我们的VPS并不总是像预期的那样工作)
我通常可以连接到我们的CRM使用IFD从我的个人电脑。我想知道的是,我可以在我们的网络之外使用组织服务吗?如果是,你知道有什么例子吗?还是与MS网站描述的标准方式相同?
谢谢
发布于 2013-12-24 20:44:33
重新检查下面的文章,它描述了如何使用C#在IFD模式下连接到客户关系管理。
发布于 2016-04-28 20:58:45
对于未来证明Andrii的答案,下面是链接文章中的示例代码:
Uri organizationUriIFD = new Uri("https://[server]:[port]/XRMServices/2011/Organization.svc");
ClientCredentials credentials = new ClientCredentials();
credentials.UserName.UserName = "username";
credentials.UserName.Password = "password";
IServiceConfiguration<IOrganizationService> config = ServiceConfigurationFactory.CreateConfiguration<IOrganizationService>(organizationUriIFD);
using (Microsoft.Xrm.Sdk.Client.OrganizationServiceProxy _serviceProxy = new OrganizationServiceProxy(config, credentials))
{
// This statement is required to enable early-bound type support.
_serviceProxy.ServiceConfiguration.CurrentServiceEndpoint.Behaviors.Add(new ProxyTypesBehavior());
IOrganizationService _service = (IOrganizationService)_serviceProxy;
WhoAmIResponse response = (WhoAmIResponse)_service.Execute(new WhoAmIRequest());
Console.WriteLine(response.UserId.ToString());
Console.ReadLine();
}https://stackoverflow.com/questions/20752932
复制相似问题