提问人:VivaLebowski 提问时间:5/19/2022 最后编辑:VivaLebowski 更新时间:5/24/2022 访问量:207
缺少 System.Security.Claims dll
Missing System.Security.Claims dll
问:
我是尝试将 .netcore3.1 应用程序发布到公司测试服务器的 ASP.net 新手;该应用程序在我的机器上编译并运行良好,并且似乎可以正常发布,但是当尝试在服务器上运行时,我得到:
"HTTP Error 500.19 - Internal Server Error"
这指示我查看事件日志...这揭示了 stacktrace 的以下异常:
System.IO.FileNotFoundException: Could not load file or assembly 'System.Security.Claims,
Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. The system cannot find the
file specified.
File name: 'System.Security.Claims, Version=5.0.0.0, Culture=neutral,
PublicKeyToken=b03f5f7f11d50a3a'
at Microsoft.AspNetCore.Server.IISIntegration.IISMiddleware.GetUser
at Microsoft.AspNetCore.Server.IISIntegration.IISMiddleware.Invoke(HttpContext httpContext)
at Microsoft.AspNetCore.Builder.Extensions.UsePathBaseMiddleware.Invoke(HttpContext context)
at
Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpProtocol.ProcessRequests[TContext]
(IHttpApplication`1 application)
唯一看起来相关的帖子是这个。System.Security.Claims 缺失
我尝试在 NuGet 中添加 system.security.claims 包并重新发布,但 System.Security.Claims 只上升到 4.3.0 版......但这要求 5.0,这似乎不存在......System.Security.Principal 有一个 v5.0,但添加它不会做任何事情。
如果可能的话,有什么方法可以解决导致堆栈跟踪中这种依赖关系的确切原因以及从哪里获取 dll?
谢谢。
答: 暂无答案
评论