dotnet / dotnet/AspNetCore.Docs
Should ambient values no longer being used be listed as a breaking change?
- Dominant language
- C#
- Stars
- 13.1k
- Forks
- 24.6k
- Avg merge
- 1d 3h
- Merged PRs (30d)
- 97
Description
This week I used this document and the migration one to move from 2.2 to 3.1. So far, so good except for routes and link building.
1. I had a problem on OAuth login where my redirect URL was null, due to a missing RouteAttribute on the target action method.
2. Some forms and anchors don't work; the Tag Helpers don't print the URL into the HTML.
The problem in the second instance was due to a missing mandatory route value needed to make up the URL. I remembered reading something about ambient route values no longer being used, but when I tried to find the documentation in the breaking changes list, I couldn't. Instead I found the helpful passage in the migration doc.
> Ambient values (route parameters from the current context) are not automatically used in link generation with endpoint routing. Previously, when generating a link to another action (or page), unspecified route values would be inferred from the current routes ambient values. When using endpoint routing, all route parameters must be specified explicitly during link generation.
Should this be considered a breaking change and listed in the breaking changes doc? It certainly broke my app!
Thanks
Luke
---
#### Document Details
⚠ *Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.*
* ID: e6e30db5-f35e-a132-1711-db051ca1d719
* Version Independent ID: da256018-fd78-2eb5-4c6c-7a6e93eaeda6
* Content: [Breaking changes, version 2.2 to 3.1 - .NET Core](https://docs.microsoft.com/en-us/dotnet/core/compatibility/2.2-3.1)
* Content Source: [docs/core/compatibility/2.2-3.1.md](https://github.com/dotnet/docs/blob/master/docs/core/compatibility/2.2-3.1.md)
* Product: **dotnet-core**
* GitHub Login: @gewarren
* Microsoft Alias: **gewarren**
Contributor guide
Assessment
This issue has not been assessed yet.