简体   繁体   English

如何修复“找不到IdentityModel.dll”?

[英]How to fix 'IdentityModel.dll not found'?

I am trying to use IdentityModel.dll via a custom class library.我正在尝试通过自定义类库使用 IdentityModel.dll。

I have a Web Service ( which will be deployed in SharePoint as WSP ) where I want to use IdentityModel.Oidcclient DLL.我有一个 Web 服务(将作为 WSP 部署在 SharePoint 中),我想在其中使用 IdentityModel.Oidcclient DLL。 This DLL is unsigned (does not have strong name).此 DLL 未签名(没有强名称)。 The signed version of DLL is asking for higher version of .Net framework. DLL 的签名版本要求更高版本的 .Net 框架。 We cannot upgrade.我们无法升级。

To solve this issue: I referred the IdentityModel.dll in my custom class library MyLibrary.dll and referred custom class library MyLibrary.dll in my original project 'MyWebService'.为了解决这个问题:我在我的自定义类库 MyLibrary.dll 中引用了 IdentityModel.dll,并在我的原始项目“MyWebService”中引用了自定义类库 MyLibrary.dll。

Per plan , the unsigned issue of Identitymodel.OidcClient is resolved.根据计划,Identitymodel.OidcClient 的未签名问题已解决。 But we are getting error for IdentityModel.dll.但是我们收到 IdentityModel.dll 的错误。

Now I am getting error现在我收到错误

{"Could not load file or assembly 'IdentityModel, Version=3.10.6.0, Culture=neutral, PublicKeyToken=e7877f4675df049f' or one of its dependencies. The system cannot find the file specified.":"IdentityModel, Version=3.10.6.0, Culture=neutral, PublicKeyToken=e7877f4675df049f"} {"无法加载文件或程序集 'IdentityModel, Version=3.10.6.0, Culture=neutral, PublicKeyToken=e7877f4675df049f' 或其依赖项之一。系统找不到指定的文件。":"IdentityModel, Version=3.10.6.0,文化=中性,PublicKeyToken=e7877f4675df049f"}

. .

I added the same version in project.我在项目中添加了相同的版本。 Even public key token is same.甚至公钥令牌也是一样的。 I deployed the DLL in GAC using GACUTIL.我使用 GACUTIL 在 GAC 中部署了 DLL。 But not resolved.但没有解决。 I am stuck here.我被困在这里。

Add the following key to the section in your web.config:将以下键添加到 web.config 中的部分:

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 System.IdentityModel.dll 中的 KerberosSecurityTokenProvider - KerberosSecurityTokenProvider in System.IdentityModel.dll 如何修复异常无法加载 DLL 'gdiplus.dll':找不到指定的模块 - How to fix exception Unable to load DLL 'gdiplus.dll': The specified module could not be found 如何修复Xamarin Forms项目上找不到的Plugin.Iconize.FontAwesome.dll.so? - How to fix Plugin.Iconize.FontAwesome.dll.so not found on a Xamarin Forms project? 未找到 SharedLibrary.dll 且未找到 mrt100_app.dll。 重新安装程序可能会解决此问题 - SharedLibrary.dll was not found and mrt100_app.dll was not found. Reinstalling the program may fix this issue 在哪里可以找到 Microsoft.IdentityModel.Extensions.dll 库? - Where can I find Microsoft.IdentityModel.Extensions.dll library? 如何解决此非托管dll安全访问问题? - How to fix this unmanaged dll security access issue? 如何修复.NET dll参考冲突? - How to fix .NET dll reference conflict? 如何修复HttpErrorResponse 404找不到 - How to fix HttpErrorResponse 404 Not found 如何使用ConfigurationManager? (Microsoft.IdentityModel.Protocols) - How to use ConfigurationManager? (Microsoft.IdentityModel.Protocols) 如何修复找不到合适的构造函数 - How to fix No suitable constructor found
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM