- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在从 .Net Core 3.1 迁移到 .NET 5.0。
我不断收到此错误消息:
Package Microsoft.AspNetCore.Authentication.JwtBearer 5.0.0 is not compatible with netcoreapp3.1 (.NETCoreApp,Version=v3.1) / win-x86. Package Microsoft.AspNetCore.Authentication.JwtBearer 5.0.0 supports: net5.0 (.NETCoreApp,Version=v5.0)
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
<UserSecretsId>5e2f8086-7a94-402a-bd2a-4160e9236c8f</UserSecretsId>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Authentication" Version="2.2.0" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="5.0.0" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.Abstractions" Version="2.2.0" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.Formatters.Json" Version="2.2.0" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation" Version="5.0.0" />
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="5.0.0" />
</ItemGroup>
</Project>
我不确定为什么它会告诉我 3.1。
最佳答案
您可以检查以下步骤来解决您的问题。
Visual Studio 16.8
或更高版本以在 Windows 上使用 .NET 5.0。请确认您的 VS 版本。<PackageReference Include="Microsoft.AspNetCore.Mvc" Version="2.2.0" />
是关于asp.net-core - 包 Microsoft.AspNetCore.Authentication.JwtBearer 5.0.0 与 netcoreapp3.1 不兼容,但它的目标是 net 5.0,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/65097569/
我不确定我是否完全理解 Microsoft.Identity.Web 的变化,但我正在关注一篇文章(given by Microsoft here) 它描述了如何在启动时进行更改 services.
我有两个 API 项目,一个基于 .NET Framework 4.6.2(旧 API),另一个基于 .NET Core 2.0。旧 API 可以非常简单地禁用自签名证书验证: System.Net.
我正在生成 JWT 以用于我的 WebApi 项目。我将 token 设置为在一分钟后过期,以便我可以测试它是否在过期日期后拒绝提交 token 。 CreateToken Controller pu
自从 RC1 的最后一次更新以来,我无法让我的 MVC 应用程序能够读取和验证 jwt token 。我以前在 Startup.cs 中有这样的工作代码: public void Configura
在我的 Asp.Net core Web api 中,我使用 Identity 和 Jwt 承载身份验证。它工作得很顺利,没有任何麻烦。这是代码, 配置服务(): services.AddIdent
在我的 asp.net core 2.0 解决方案中,我想添加 Azure AD 身份验证。通过 VS 2017 中的 Azure AD 模板,您可以获得 JWTBearer 身份验证实现或 Open
这几天我一直在用头撞墙。解决方案可能太简单了,无法在博客中陈述,所以我在这里提出这个问题。 我正在开发一个 .NET Core Web API,它应该将所有身份验证和授权委托(delegate)给 K
需要您帮助解决以下问题。我正在 VS2017 中的 .netcore 中创建一个 webapi,并且我尝试使用 https://apps.dev.microsoft.com/ 的新身份验证模型。 .
需要您帮助解决以下问题。我正在 VS2017 中的 .netcore 中创建一个 webapi,并且我尝试使用 https://apps.dev.microsoft.com/ 的新身份验证模型。 .
我正在使用 ASP.Net Core WebApi 构建 Web 服务。我想使用 Identity 和 JWTBearer 身份验证。我在 Startup 类 id 的 ConfigureServic
我正在使用 ASP.NET Core 2.0 Web Api 并通过 Azure AD 进行身份验证。 为了针对 Azure AD 进行身份验证,我使用 key 而不是用户凭据。 key 在 Azur
我在让我的 asp.net 5 网络应用能够接受 JWT token 时遇到了很多麻烦。我的代码已经使用 mvc5 完全正常运行,只是需要一些帮助将此代码转换为相同但可与 mvc6 一起使用。它的设置
我试图让一个简单的端点工作,使用 AspNew.Security.OpenIdConnect.Server 发布和使用 JWT token 来发布 token 并使用 Microsoft.AspNet
在启动时我有 services.AddAuthentication(JwtBearerDefaults.AuthenticationScheme) .AddJwtBearer(options => {
使用 using Microsoft.AspNetCore.Authentication.JwtBearer; 我一直无法弄清楚如何将标题中的“Bearer”键更改为其他内容,在这种情况下我会喜欢它成
我正在从 .Net Core 3.1 迁移到 .NET 5.0。 我不断收到此错误消息: Package Microsoft.AspNetCore.Authentication.JwtBearer 5
我尝试将带有 React.js 模板 (dotnet SDK v7.0.101) 的 Asp.Net Core 部署到具有“个人帐户”身份验证类型的新 Azure Web 应用程序。 应用程序在使用本
我是一名优秀的程序员,十分优秀!