无效的404路由只显示Main,不显示菜单栏和标题栏 #3992
-
Is there an existing issue for this?
Describe the bug点击进入这个地址,就会只显示Main,而不渲染菜单栏和标题栏。直接从浏览器输入无效的URL也是如此。 在2年前的老版本中,就没有这个问题。即便URL无效,也会正确的渲染它们。 页面的代码如下。 Expected BehaviorNo response Steps To ReproduceExceptions (if any)No response .NET Version.NET 8 Anything else?No response |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments 4 replies
-
@WeiJunFenYou Thank you for filing this issue. In order for us to investigate this issue, please provide a minimalistic repro project that illustrates the problem. |
Beta Was this translation helpful? Give feedback.
-
@WeiJunFenYou 请提供简单的复现例子,而不是 abp 例子,请帮忙点一下右上角 star 谢谢啦 |
Beta Was this translation helpful? Give feedback.
-
好的。我使用官网提供的项目模板,创建了一个“BootstrapBlazor.UiBugTest”项目。这是一个 Server side类型的项目。源代码在这里:https://github.com/WeiJunFenYou/BootstrapBlazor.UiBugTest 如果访问一个无效的url地址,代码中预设的行为,是显示“Sorry, there's nothing at this address.”。但模板项目却显示无法访问。 预期的结果,应该是程序正确的渲染标题栏和菜单栏,并显示“Sorry, there's nothing at this address.” |
Beta Was this translation helpful? Give feedback.
-
@WeiJunFenYou 感谢,我复现如果是 bug 我修复一下 |
Beta Was this translation helpful? Give feedback.
-
@WeiJunFenYou https://learn.microsoft.com/en-us/aspnet/core/fundamentals/error-handling?view=aspnetcore-8.0 所以目前就是这样的
|
Beta Was this translation helpful? Give feedback.
@WeiJunFenYou
net8
移除了NotFound
模板,更改为使用Error
页面https://learn.microsoft.com/en-us/aspnet/core/fundamentals/error-handling?view=aspnetcore-8.0
所以目前就是这样的
Error
页面里需要自己处理相关逻辑