How to get actual Uri if receiving NotFound #12416
-
I would like to log the requested uri that could not be found. Can someone tell me how to access the actually requested uri, please? :) |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
Perhaps we could log into diagnostics module, but you could write a middleware that checks the response code status 404 then you can log the requested URL |
Beta Was this translation helpful? Give feedback.
-
We have an HttpFeature holding the OriginalPathBase and OriginalPath that you can retrieve from the current HttpContext, e.g. from a razor view. @using OrchardCore.Environment.Shell
|
Beta Was this translation helpful? Give feedback.
We have an HttpFeature holding the OriginalPathBase and OriginalPath that you can retrieve from the current HttpContext, e.g. from a razor view.
@using OrchardCore.Environment.Shell