Don't miss out Virtual Happy Hour this Friday (April 26).

Try our conversational search powered by Generative AI!

404 Handler logging HttpException

Vote:
 

CMS 11.10.6

404Handler 11.1.12

We are getting the following HttpExceptions being logged for 404 and 301 statuses :

The controller for path '' was not found or does not implement IController.

The BVNetwork 404 Handler has the following configuration

The /ErrorPage/NotFound action has the NotFoundPage attribute applied

#202160
Mar 17, 2019 23:24
Vote:
 

From what Base controller  your are inheriting your ErrorPageController?

#202165
Mar 18, 2019 10:08
Vote:
 

It seems like MVC tries to route the request and cannot find a controller on it's own. Then it throws an exception, Episerver is logging it and only then the 404 handler is invoked.

I have seen similar log entries, however, in my case, the 404 handler still renders the error page nicely.

#202166
Mar 18, 2019 10:20
Vote:
 

Thanks Praful and Stefan for your response

To clarify the 404 page is displaying correcting and configured URL redirects in the 404 Handler are working. However a large number of exceptions are still raised for both 404 and 301 statuses. Are you saying this is expected behaviour ?

ErrorPageController is inheriting from PageController<T>

#202184
Mar 19, 2019 3:02
Vote:
 

Not expected, but known behaviour (see this issue).

Do you see this because of pages or static files? Because I see this only for static file requests, where as content requests get routed by Episerver and does not get logged like this.

#202185
Mar 19, 2019 6:35
Vote:
 

For both page and static file requests.

Strangely the exceptions logged for page requests are those that have been configured for redirects in the 404 Handler. It seems Episerver logs the exception and then the 404 Handler does the redirect.

#202223
Mar 20, 2019 6:30
Vote:
 

Hi!

From the Readme on Git:

Important! errorMode needs to be set to Custom and existingResponse needs to be set to Replace, or the 404 page will not be shown, or will only be shown for URLs not ending with .aspx.

I see you have existingResponse set to Auto. What happens if you change it to Replace?

#202261
Mar 21, 2019 9:59
Vote:
 

If you want to remove those "errors" from your logfil (They are not really errors now are they), check out this post: https://world.episerver.com/blogs/Henrik-Fransas/Dates/2014/3/How-to-remove-logging-of-404-request-from-EPiServers-logfiles/

#202273
Mar 21, 2019 12:16
Vote:
 
#202984
Apr 05, 2019 4:50
Vote:
 

Wow, that was a very good way to kill performance.

#202991
Apr 05, 2019 12:57
Vote:
 

the fastest sites are serving empty index.html file

#203265
Apr 14, 2019 15:02
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.