【问题标题】:Connecting Organisation service using CRM 2011 IFD使用 CRM 2011 IFD 连接组织服务
【发布时间】:2013-12-23 23:48:43
【问题描述】:

我只是说要学习 xRM。大多数时候,我将在我的工作网络之外工作。 (由于许多原因,我们的 VPS 并不总是按预期工作)

我通常可以使用 IFD 从我的个人 PC 连接到我们的 CRM。我想知道的是,我可以从我们的网络外部使用组织服务吗?如果是,你知道任何例子吗?还是与 MS CRM 网站上描述的标准方式相同?

谢谢

【问题讨论】:

    标签: c# dynamics-crm-2011 dynamics-crm


    【解决方案1】:

    为了满足未来的 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();
    }
    

    【讨论】:

      【解决方案2】:

      重新检查以下article,该article 描述了如何使用 C# 在 IFD 模式下连接到 CRM。

      【讨论】:

      • 谢谢安德烈。一旦我恢复我的互联网连接,我就会尝试一下。 (是的,过去 3 天服务中断太好了!!)
      猜你喜欢
      • 2014-01-24
      • 2015-08-15
      • 1970-01-01
      • 2011-08-19
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多