Is Url.AbsoluteContent extension method still available in version 5? #122
Replies: 4 comments
-
I recommend switching to use |
Beta Was this translation helpful? Give feedback.
-
Then this change is what you expect, isn't it? // OLD
new Uri(Url.AbsoluteContent($"~/img/og-image.jpg?v={favIconVersion}")),
// NEW
new UriBuilder(request.Scheme,
request.Host.Host,
request.Host.Port.GetValueOrDefault(),
Url.Content($"~/img/og-image.jpg?v={favIconVersion}"))
.Uri, |
Beta Was this translation helpful? Give feedback.
-
Hmmmm, this is a good question and I can't see an answer for how to do this using https://docs.microsoft.com/en-us/aspnet/core/fundamentals/routing?view=aspnetcore-2.1 Reopening until we get an answer. |
Beta Was this translation helpful? Give feedback.
-
This is now answered in dotnet/AspNetCore.Docs#16501. |
Beta Was this translation helpful? Give feedback.
-
I can't find those extension methods
Beta Was this translation helpful? Give feedback.
All reactions