URLRewritingEvents.PageNotFound.Execute not firing

Kàren Vaganyan asked on August 1, 2019 00:18

I’m currently running Kentico 10.0.51. I have a global event setup for URLRewritingEvents.PageNotFound.Execute and it seems to fire the event code fine when the requested page does not have a nested slash, e.g. /something, but it doesn’t fire if the requested page is /something1/something2. Any ideas why this might be happening? Below is my method definition and arguments:

private void PageNotFound_Handler(object sender, URLRewriterPageNotFoundEventArgs e)

Correct Answer

Kàren Vaganyan answered on August 2, 2019 01:28

Through some further debugging I figured out that everything was working as expected, the issue was the URL requested itself. The URL contained /con which is a reserved URL keyword in ASP.NET.

0 votesVote for this answer Unmark Correct answer

   Please, sign in to be able to submit a new answer.