惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

N
News and Events Feed by Topic
S
SegmentFault 最新的问题
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Last Week in AI
Last Week in AI
Jina AI
Jina AI
H
Help Net Security
C
Check Point Blog
aimingoo的专栏
aimingoo的专栏
MyScale Blog
MyScale Blog
H
Hackread – Cybersecurity News, Data Breaches, AI and More
Vercel News
Vercel News
L
LangChain Blog
Recorded Future
Recorded Future
F
Full Disclosure
Google DeepMind News
Google DeepMind News
Microsoft Security Blog
Microsoft Security Blog
I
InfoQ
GbyAI
GbyAI
B
Blog RSS Feed
T
The Blog of Author Tim Ferriss
Engineering at Meta
Engineering at Meta
A
About on SuperTechFans
M
MIT News - Artificial intelligence
爱范儿
爱范儿
V
V2EX
Microsoft Azure Blog
Microsoft Azure Blog
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
Y
Y Combinator Blog
B
Blog
WordPress大学
WordPress大学
Blog — PlanetScale
Blog — PlanetScale
W
WeLiveSecurity
MongoDB | Blog
MongoDB | Blog
Cloudbric
Cloudbric
N
News and Events Feed by Topic
The Cloudflare Blog
月光博客
月光博客
博客园 - 三生石上(FineUI控件)
有赞技术团队
有赞技术团队
D
DataBreaches.Net
博客园 - 【当耐特】
T
Troy Hunt's Blog
V
Visual Studio Blog
V2EX - 技术
V2EX - 技术
Apple Machine Learning Research
Apple Machine Learning Research
博客园 - 司徒正美
Recent Commits to openclaw:main
Recent Commits to openclaw:main
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Google Online Security Blog
Google Online Security Blog
The GitHub Blog
The GitHub Blog

博客园 - 星畔

解决网站访问突然变成“403禁止访问:访问被拒绝” 解决openclaw + 飞书群不@所有人,群里其他人不回复的问题 针对 WSL 环境的特殊处理(如果你用的是 Windows 子系统) wsl 删除ubuntu-24.04 window 站点 vue3编译后的项目刷新页面404解决办法 ASP.NET Core Web API 需要先发布到 IIS 服务器才能运行 使用 .NET Core。如果目标进程未运行 .NET Core,则发生这种情况并不意外。 完美解决:没有对“C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files”的写访问权限。 - 星畔 Windows10 IIS Web服务器安装配置 解决“远程桌面连接:出现身份验证错误,要求的函数不受支持。。。 ” elasticsearch 请求被中止: 未能创建 SSL/TLS 安全通道”的原因及解决办法 从 bcp 客户端收到一个对 colid x 无效的列长度。 log4j的配置ConversionPattern详细讲解 SQL 更改字段长度 SQL Server(00):表压缩 Vue网站发布到iis后提示404页面不可访问 mysql根据一个表的数据更新另一个表数据的SQL写法 C#中四舍五入的正确写法是什么?
因 Cookie 被添加了 SameSite=None 属性导致在非 https 环境下无法为网站正确设置 Cookie 进而导致系统状态异常的问
星畔 · 2025-07-31 · via 博客园 - 星畔

这个错误很隐蔽,因为它不会出现在控制台的报错中,只会在 POST 请求响应头的 Set-Cookie 后面有一个黄色感叹号,鼠标放上去才能看到以下提示。

尝试通过 Set-Cookie 标头设置 Cookie 的操作被禁止了,因为此标头具有"SameSite=None"属性但缺少使用"SameSite=None"所需的"Secure"属性。

但是很奇怪,代码层面并没有添加相关内容,且目前在大多数环境中都没有出现这个问题。

经过询问 ChatGPT 得知,有一个补丁 KB4533013 更改了 .NET Framework 4.7.2 的默认行为,默认添加了该属性。

但看到该补丁是 2019 年 12 月发布的,不知为何最近才暴露问题。

最好的处理是根据情况选择合适的 SameSite 配置,或使用 https 协议提供服务。

还有一种就是还原该行为到之前的状态,在 Web.config 文件中添加以下配置:

<configuration> 
  <appSettings>
    <add key="aspnet:SuppressSameSiteNone" value="true" />
  </appSettings>
 
  <system.web> 
    <authentication> 
      <forms cookieSameSite="None" /> 
    </authentication> 
    <sessionState cookieSameSite="None" /> 
  </system.web> 
</configuration>