404 Handler logging HttpException

Ron Rangaiya
Member since: 2014
 

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
Praful Jangid
Member since: 2017
 

From what Base controller  your are inheriting your ErrorPageController?

#202165
Mar 18, 2019 10:08
Stefan Holm Olsen
Member since: 2013
 

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
Ron Rangaiya
Member since: 2014
 

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
Stefan Holm Olsen
Member since: 2013
 

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
Ron Rangaiya
Member since: 2014
 

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
Mattias Olsson
Member since: 2005
 

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
Andreas Nicolaisen
Member since: 2006
 

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
Ron Rangaiya
Member since: 2014
Quan Mai
Member since: 2011
 

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

#202991
Apr 05, 2019 12:57
valdis iljuconoks
Member since: 2011
 

the fastest sites are serving empty index.html file

#203265
Apr 14, 2019 15:02