【问题标题】:How to fix 'IdentityModel.dll not found'?如何修复“找不到 IdentityModel.dll”?
【发布时间】:2019-08-17 15:33:54
【问题描述】:

我正在尝试通过自定义类库使用 IdentityModel.dll。

我有一个 Web 服务(将作为 WSP 部署在 SharePoint 中),我想在其中使用 IdentityModel.Oidcclient DLL。此 DLL 未签名(没有强名称)。 DLL 的签名版本要求更高版本的 .Net 框架。我们无法升级。

要解决此问题: 我在我的自定义类库 MyLibrary.dll 中引用了 IdentityModel.dll,并在我的原始项目“MyWebService”中引用了自定义类库 MyLibrary.dll。

按计划,Identitymodel.OidcClient 的未签名问题已解决。 但是我们遇到了 IdentityModel.dll 错误。

现在出现错误

{"无法加载文件或程序集 'IdentityModel, Version=3.10.6.0, Culture=neutral, PublicKeyToken=e7877f4675df049f' 或其之一 依赖关系。系统找不到文件 指定。":"IdentityModel,版本=3.10.6.0,文化=中性, PublicKeyToken=e7877f4675df049f"}

我在项目中添加了相同的版本。甚至公钥令牌也是一样的。我使用 GACUTIL 在 GAC 中部署了 DLL。但没有解决。我被困在这里了。

【问题讨论】:

    标签: c# authentication sharepoint dll wsp


    【解决方案1】:

    将以下键添加到 web.config 中的部分:

    <compilation debug="true" targetFramework="4.5" >    
        <assemblies>
          <add assembly="IdentityModel, Version=3.10.6.0, 
              Culture=neutral, PublicKeyToken=e7877f4675df049f" />
        </assemblies>
    </compilation> 
    

    【讨论】:

    • 谢谢。这可能对某人有用,但对我不起作用。我使用 GACUTIL 在程序集中部署了 DLL。
    猜你喜欢
    • 2022-07-25
    • 2021-11-13
    • 2019-10-20
    • 2020-12-18
    • 2023-03-29
    • 2019-10-19
    • 2020-02-15
    • 2023-03-19
    • 2013-11-26
    相关资源
    最近更新 更多