how to get absolute request URL in asp.net core?
in asp.net mvc Httpcontext.request has a property as URL but not available in asp.net core.
I want access to absolute request URL in actionfilter.
Asked
Active
Viewed 423 times
0

Hossein rezaei
- 13
- 6
-
i find the way to get url but stackowerflow not let me to answer. i use UriBuilder to generate absolute URL. – Hossein rezaei Jul 10 '21 at 23:23
-
Does this answer your question? [How to get current url in view in asp.net core 1.0](https://stackoverflow.com/questions/38437005/how-to-get-current-url-in-view-in-asp-net-core-1-0). This is obviously from ASP.NET Core 1.0, but the answers remain relevant in ASP.NET Core 5.0 as well. It annoys me that there's no longer a property that returns a `Uri` object, but you can create an extension method that does that for you as discussed in this thread. – Jeremy Caney Jul 25 '21 at 20:36