[英]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.