Go to file
Javier Calvarro Nelson 6bb4a3f370
[Blazor] Fixes issues with route precedence (#27907)
Description
In 5.0 we introduced two features on Blazor routing that enable users to write routing templates that match paths with variable length segments. These two features are optional parameters {parameter?} and catch all parameters {*catchall}.

Our routing system ordered the routes based on precedence and the (now false) assumption that route templates would only match paths with an equal number of segments.

The implementation that we have worked for naïve scenarios but breaks on more real world scenarios. The change here includes fixes to the way we order the routes in the route table to match the expectations as well as fixes on the route matching algorithm to ensure we match routes with variable number of segments correctly.

Customer Impact
This was reported by customers on #27250

The impact is that a route with {*catchall} will prevent more specific routes like /page/{parameter} from being accessible.

There are no workarounds since precedence is a fundamental behavior of the routing system.

Regression?
No, these Blazor features were initially added in 5.0.

Risk
Low. These two features were just introduced in 5.0 and their usage is not as prevalent as in asp.net core routing. That said, it's important to fix them as otherwise we run the risk of diverting in behavior from asp.net core routing and Blazor routing, which is not something we want to do.

We have functional tests covering the area and we've added a significant amount of unit tests to validate the changes.
2020-11-20 11:43:11 -08:00
.azure/pipelines Don't push to VS feed when post build sign == true (#27265) 2020-11-10 12:35:49 -08:00
.config Update dependencies from https://github.com/dotnet/efcore build 20201110.8 (#27708) 2020-11-11 06:20:15 +00:00
.github
.vscode
docs
eng [release/5.0] Update dependencies from dotnet/efcore dotnet/runtime (#27916) 2020-11-20 16:42:38 +00:00
src [Blazor] Fixes issues with route precedence (#27907) 2020-11-20 11:43:11 -08:00
.editorconfig
.gitattributes
.gitignore
.gitmodules
.vsconfig
AspNetCore.sln
CODE-OF-CONDUCT.md
CONTRIBUTING.md
Directory.Build.props [release/5.0] Update API baseline files (#27653) 2020-11-12 10:28:52 -08:00
Directory.Build.targets [release/5.0] Update API baseline files (#27653) 2020-11-12 10:28:52 -08:00
LICENSE.txt
NuGet.config [release/5.0] Update dependencies from dotnet/efcore dotnet/runtime (#27916) 2020-11-20 16:42:38 +00:00
README.md
SECURITY.md
THIRD-PARTY-NOTICES.txt
activate.ps1
activate.sh
build.cmd
build.ps1
build.sh
clean.cmd
clean.ps1
clean.sh
dockerbuild.sh
global.json [release/5.0] Update dependencies from dotnet/arcade (#27683) 2020-11-12 19:46:20 +00:00
restore.cmd
restore.sh
startvs.cmd

README.md

ASP.NET Core

ASP.NET Core is an open-source and cross-platform framework for building modern cloud based internet connected applications, such as web apps, IoT apps and mobile backends. ASP.NET Core apps run on .NET Core, a free, cross-platform and open-source application runtime. It was architected to provide an optimized development framework for apps that are deployed to the cloud or run on-premises. It consists of modular components with minimal overhead, so you retain flexibility while constructing your solutions. You can develop and run your ASP.NET Core apps cross-platform on Windows, Mac and Linux. Learn more about ASP.NET Core.

Get Started

Follow the Getting Started instructions in the ASP.NET Core docs.

Also check out the .NET Homepage for released versions of .NET, getting started guides, and learning resources.

See the Triage Process document for more information on how we handle incoming issues.

How to Engage, Contribute, and Give Feedback

Some of the best ways to contribute are to try things out, file issues, join in design conversations, and make pull-requests.

Reporting security issues and bugs

Security issues and bugs should be reported privately, via email, to the Microsoft Security Response Center (MSRC) secure@microsoft.com. You should receive a response within 24 hours. If for some reason you do not, please follow up via email to ensure we received your original message. Further information, including the MSRC PGP key, can be found in the Security TechCenter.

These are some other repos for related projects:

Code of conduct

See CODE-OF-CONDUCT