【问题标题】:Dynamics CRM connection through Live service gives error通过 Live 服务连接 Dynamics CRM 时出现错误
【发布时间】:2016-09-22 07:44:12
【问题描述】:

您好,我正在尝试使用 Godaddy 服务器上托管的 Live wcf rest 服务连接 CRM online 2016 但它给出了以下错误。但它在 localhost 中运行良好。

错误:

System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.IdentityModel, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.

File name: 'Microsoft.IdentityModel, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'

   at Microsoft.Xrm.Sdk.Client.ServiceMetadataUtility.RetrieveACSIssuerEndpoints(Uri trustUrl)

   at Microsoft.Xrm.Sdk.Client.ServiceConfiguration`1.SetAuthenticationConfiguration()

   at Microsoft.Xrm.Sdk.Client.ServiceConfiguration`1..ctor(Uri serviceUri, Boolean checkForSecondary)

   at Microsoft.Xrm.Sdk.Client.OrganizationServiceConfiguration..ctor(Uri serviceUri, Boolean enableProxyTypes, Assembly assembly)

   at Microsoft.Xrm.Sdk.Client.ServiceConfigurationFactory.CreateConfiguration[TService](Uri serviceUri, Boolean enableProxyTypes, Assembly assembly)

   at Microsoft.Xrm.Sdk.Client.ServiceConfigurationFactory.CreateConfiguration[TService](Uri serviceUri)

   at Microsoft.Xrm.Sdk.Client.ServiceProxy`1..ctor(Uri uri, Uri homeRealmUri, ClientCredentials clientCredentials, ClientCredentials deviceCredentials)

   at PortalRestfulService.Service1.authentication(CRMCredential objauthentication)



WRN: Assembly binding logging is turned OFF.

To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.

Note: There is some performance penalty associated with assembly bind failure logging.

To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].

请给我建议解决方案。

【问题讨论】:

    标签: wcf dynamics-crm dynamics-crm-2013 dynamics-crm-online


    【解决方案1】:

    尝试将您的 IdentityModel dll 复制到 bin 文件夹中。

    但是,由于可能您在 Godaddy 中的 WCF 服务使用共享应用程序池并以部分信任的方式运行,因此它以有限的权限集运行,因此您会遇到其他问题。

    尝试在本地主机中以部分信任模式重新编译/重新测试您的服务,您可能会重现该问题。

    所以解决方案是:

    1. 更改您的代码,使其在部分信任下正常工作
    2. 使用其他托管选项(例如完整的 VM),您可以在其中执行几乎所有您想做的事情(例如在完全信任下运行代码、安装身份模型程序集等...)。

    【讨论】:

    • 嗨,它处于完全信任模式。有没有其他方法可以解决这个问题?
    • 尝试将您的 IdentityModel dll 复制到 bin 文件夹中。
    猜你喜欢
    • 1970-01-01
    • 2011-06-29
    • 1970-01-01
    • 2022-12-09
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-02-15
    相关资源
    最近更新 更多