- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我有一个带有此身份验证设置的 Asp.NET MVC 应用程序:
配置服务():
services.AddSession()
services.AddAuthentication(sharedOptions => sharedOptions.SignInScheme = CookieAuthenticationDefaults.AuthenticationScheme);
app.UseCookieAuthentication(new CookieAuthenticationOptions());
app.UseOpenIdConnectAuthentication(new OpenIdConnectOptions
{
ClientId = "xx",
Authority = "xx",
Events = new OpenIdConnectEvents { OnRemoteFailure = this.OnAuthenticationFailed }
});
Microsoft.AspNetCore.Session.SessionMiddleware,
Error unprotecting the session cookie.
System.Security.Cryptography.CryptographicException: The key {9ec59def-874e-45df-9bac-d629f5716a04} was not found in the key ring.
at Microsoft.AspNetCore.DataProtection.KeyManagement.KeyRingBasedDataProtector.UnprotectCore(Byte[] protectedData, Boolean allowOperationsOnRevokedKeys, UnprotectStatus& status)
at Microsoft.AspNetCore.DataProtection.KeyManagement.KeyRingBasedDataProtector.DangerousUnprotect(Byte[] protectedData, Boolean ignoreRevocationErrors, Boolean& requiresMigration, Boolean& wasRevoked)
at Microsoft.AspNetCore.DataProtection.KeyManagement.KeyRingBasedDataProtector.Unprotect(Byte[] protectedData)
at Microsoft.AspNetCore.Session.CookieProtection.Unprotect(IDataProtector protector, String protectedText, ILogger logger)
最佳答案
services.AddSession(options => {
options.IdleTimeout = TimeSpan.FromHours(12);
options.Cookie.Name = ".yourApp.Session"; // <--- Add line
options.Cookie.IsEssential = true;
});
关于authentication - "Error unprotecting the session cookie"异常,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40865011/
我惊讶地发现我无法强制推送到我在 GitLab 上拥有的项目的 master 分支。 另外,我在 Web UI 中似乎无法取消对分支的保护。 您将如何解决这个问题? 最佳答案 事实证明这是 Firef
我们有一个构建过程,需要解密密码,然后使用该密码连接到数据库。我们使用数据保护 API (DPAPI) 通过 PowerShell 在构建服务器上的计算机范围内加密密码(我使用自己的域帐户登录): [
我有这段代码可以存储和恢复授权 token (字母数字): public static void Store (string token) { byte[] buffer = Encoding
假设我加密数据并将其写入如下文件: byte[] encrypted = ProtectedData.Protect(plain, null, DataProtectionScope.Curr
我有一个带有此身份验证设置的 Asp.NET MVC 应用程序: 配置服务(): services.AddSession() services.AddAuthentication(sharedOpti
Appscan 工具在我的应用程序中使用以下代码段时报告问题: con=DriverManager.getConnection("jdbc:oracle:thin:@localhost:1521:xe
有时我会遇到这样一种情况,我会得到一个具有 protected 静态成员的类(无法修改),例如 struct foo { protected: static const int x = 42;
我正在使用 .net 4.5 和 MachineKey.Protect/MachineKey.Unprotect 来加密和解密值。我想知道当我们将代码部署到我们将拥有多个服务器的生产环境时,Machi
背景: 我正在尝试支持授权代码流以启用从我的应用程序到第三方应用程序的 SSO。 现在我卡在了应该返回 AuthenticationTicket 的 Unprotect 方法的实现上。 OAuth2
我正在尝试为IdentityServer4创建身份验证的主从类型配置,如下所示 MyMasterIdentityServer0 (Master) - receives id_token and giv
我正在尝试解密由另一个 .NET 4.6.2 MVC 应用程序设置的身份验证 cookie,该应用程序是在 Startup.Auth 中使用以下内容创建的: TicketDat
我已经使用 spring boot 实现了授权服务器和资源服务器。授权服务器工作正常,我能够获得 token 。但是我的资源服务器仍然不 protected 。我的目标是资源服务器只能由拥有有效访问
Rails 应用程序中的模型有一个 url 列,用户可以在其中输入外部站点的地址。 网址显示在页面上。单击时,除了路由到该 url 之外,我还需要在应用程序中执行一些操作。所以我定义了一个 Contr
在 System.Web.Security 命名空间之外是否有一个简单易用的加密/解密方法,与 MachineKey.Protect/MachineKey.Unprotect() 一样易于使用>? 或
我需要在本地数据库中存储和检索敏感数据 - 此数据由 Web 应用程序使用。 为了保护上述数据,我选择使用 ProtectedData 类。 IIS 应用程序正在使用特定的 AD 用户运行(高级设置中
我目前正在研究一组代码,该代码根据当前用户的用户名锁定和解锁工作表,没什么特别的。这段代码运行良好,除了在保存后部分。间歇性地,当保存在公司服务器上时,仅在我的计算机上(尽管它仅在 3 台计算机上进行
我必须在一堆未答复的帖子中添加另一篇帖子来表明同样的问题。我正在使用 Spring Boot 2.1.6.RELEASE 和 spring-security-oauth2 2.1.5.RELEASE。
当我将 Bearer token 与受 [Authorize] 保护的 AspNetCore Controller 一起使用时,我收到日志消息: info: Microsoft.AspNetCore.
所以我尝试在 System.Security.Cryptography.ProtectedData 对象中使用 Unprotect 方法并不断收到异常: cryptographicexception
我正在尝试使用用于 Windows 的 OpenSSH 使用私钥与 SSH 服务器进行简单连接,并且遇到了以下情况: @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
我是一名优秀的程序员,十分优秀!