【发布时间】:2020-07-04 10:58:15
【问题描述】:
描述错误
如附件截图所示,我正在使用路由:
@page "/addbrand/{BrandId:guid}"
当我刷新 url https://localhost:44379/addBrand/1abc52f3-c371-4566-847d-1a986f093396 时,这会导致错误 400 无法加载资源,因为 balzor 协商的 url 更改为 https://localhost:44379/addBrand/_blazor/negotiate?negotiateVersion=1 而不是 https://localhost:44379/_blazor/negotiate?negotiateVersion=1
https://localhost:44379/addBrand/_framework/blazor.server.js 而不是 https://localhost:44379/_framework/blazor.server.js
这发生在 _host.cshtml 文件中的所有链接上。
有例外吗?是的,浏览器控制台日志: [2020-03-23T21:57:35.846Z] 信息:将“_blazor”规范化为“https://localhost:44379/addBrand/_blazor”。 _blazor/negotiate?negotiateVersion=1:1 加载资源失败:服务器响应状态为400() blazor.server.js:1 [2020-03-23T21:57:35.917Z] 错误:无法完成与服务器的协商:错误
更多技术细节
- ASP.NET Core 版本:3.1
- IDE:VS 2019
我已经在github举报了
【问题讨论】: