November Happy Hour will be moved to Thursday December 5th.
November Happy Hour will be moved to Thursday December 5th.
Hi Anders,
Have you tried using Elmah (http://elmah.github.io/) or similar tool to review unhandled exceptions?
Hi,
I'm working with Anders on the same project and I tried Elmah, but it is only logging unhandled exceptions, and although the error says Unhandled exception it is handled by Episerver.Global, i.e. EpiServer.Global writes to log, and does not throw the excpetion again, so Elmah is not able to catch the exception...
Anybody else have some suggestions ?
If the error is swallowed, you could also attach to the Error event in Global.asax.cs and do some additional logging:
public override void Init() { Error += EPiServerApplication_Error; base.Init(); } private void EPiServerApplication_Error(object sender, EventArgs e) { if (HttpContext.Current == null) return; Exception lastError; try { lastError = Server.GetLastError(); } catch { return; } if (lastError == null) return; // TODO: log error try { // TODO: Clear the last error and return correct status code Server.ClearError(); Response.Clear(); ExceptionManager.RenderHttpRuntimeError(lastError); Response.End(); } catch { } }
My apologies for 3 posts in a row. Neither Edit nor Delete buttons are working for me :(
Regarding Elmah... Did you configure Elmah correctly?
For example, in Alloy website, if I throw an exception or navigate to a non-existing page, I also get "EPiServer.Global: 1.2.5 Unhandled exception in ASP.NET" in the log file.
But Elmah shows me proper errors.
Can you verify this in your project?
Hi Dejan,
I'll try replay on your 3 posts in 1 post :)
1. I see other like e.g. : System.IO.DirectoryNotFoundException: Could not find a part of the path 'C:\Code\CXP\SolarB2bEpiserver\SolarB2bEpiserver\App_Data\blobs\b7b5645dddb14cffad7e9806d0451d44\0a9daf6ab794486ca60d4091c6c867d2_Thumbnail.png'.
These appear in both EpiServerErrors.log and Elmah. But the "1.2.5 Unhandled exception in ASP.NET" only appears in log-file
Looking at source code of Episerver.Global (http://world.episerver.com/documentation/class-library/?documentId=cms/7/e9e09ee4-16f6-ec1e-fc40-180b192c7f05) there is this line :
_log.Error("1.2.5 Unhandled exception in ASP.NET", e);
this makes me think that although it says Unhandled exception, it is actually handled by EpiServer.Global (i.e. written to log), and thus not catched by Elmah, but maybe I'm wrong (see 3) ...???
2. That's what I'm planning to do today :)
just tried this, and lastError = null...
3. I'n not sure I configed Elamh correctly, but if you can catch there "1.2.5 Unhandled exception in ASP.NET" while I don't, it might be configed wrong.... I installed it from NuGet and ran the project... but if you can tell me how to config it... :)
Hi Tarek
We identified the cause of our problems, but we haven't fixed it.
The problem seems to be related to the BVNetwork 404Handler. The 404 handler handles 404 pages, but they are apparantly still raised as unhandled exceptions that the Episerver unhandled exception handler catches. But in this situation, the inner exception is gone, so Episerver doesn't log any details.
I raised an issue on the 404Handler board: https://github.com/BVNetwork/404handler/issues/35, but nobody have replied to my thread.
I don't know if the problem should be fixed by BVNetwork or by Episerver, and we haven't investigated it further. I haven't raised the issue with Episerver Support either.
Our main problem was caused by our operations monitoring that tried to call an alive page that we haden't created on Episerver yet. As the monitoring tool called the page every minute or so, it generated a lot of 404 messages that ended up in the log. This is fixed, so now we only see extra logging of the "real" 404 requests, which is still a problem but more manageable.
Regards
Anders
This was a bug in Episerver error handling which is fixed in the latest versions.
Hi all
We get a lot of errors in our EPiServerErrors.log every day. Se the list below.
Unfortunately we get no further description on what is wrong. Do you have any idea how we can debug this?
Thank you for your help.
2017-02-19 08:31:53,602 [191] ERROR EPiServer.Global: 1.2.5 Unhandled exception in ASP.NET
2017-02-19 08:31:53,633 [118] ERROR EPiServer.Global: 1.2.5 Unhandled exception in ASP.NET
2017-02-19 08:31:53,664 [154] ERROR EPiServer.Global: 1.2.5 Unhandled exception in ASP.NET
2017-02-19 08:31:53,727 [118] ERROR EPiServer.Global: 1.2.5 Unhandled exception in ASP.NET
2017-02-19 08:31:53,758 [211] ERROR EPiServer.Global: 1.2.5 Unhandled exception in ASP.NET
2017-02-19 08:31:53,789 [271] ERROR EPiServer.Global: 1.2.5 Unhandled exception in ASP.NET
2017-02-19 08:31:53,836 [160] ERROR EPiServer.Global: 1.2.5 Unhandled exception in ASP.NET
2017-02-19 08:31:53,883 [64] ERROR EPiServer.Global: 1.2.5 Unhandled exception in ASP.NET
2017-02-19 08:31:53,930 [244] ERROR EPiServer.Global: 1.2.5 Unhandled exception in ASP.NET
2017-02-19 08:31:53,961 [60] ERROR EPiServer.Global: 1.2.5 Unhandled exception in ASP.NET
2017-02-19 08:31:53,993 [155] ERROR EPiServer.Global: 1.2.5 Unhandled exception in ASP.NET
2017-02-19 08:31:54,086 [188] ERROR EPiServer.Global: 1.2.5 Unhandled exception in ASP.NET
2017-02-19 08:31:54,117 [257] ERROR EPiServer.Global: 1.2.5 Unhandled exception in ASP.NET
2017-02-19 08:31:54,149 [154] ERROR EPiServer.Global: 1.2.5 Unhandled exception in ASP.NET
2017-02-19 08:31:54,196 [118] ERROR EPiServer.Global: 1.2.5 Unhandled exception in ASP.NET
2017-02-19 08:31:54,227 [211] ERROR EPiServer.Global: 1.2.5 Unhandled exception in ASP.NET
2017-02-19 08:31:54,258 [201] ERROR EPiServer.Global: 1.2.5 Unhandled exception in ASP.NET
2017-02-19 08:31:54,289 [160] ERROR EPiServer.Global: 1.2.5 Unhandled exception in ASP.NET
2017-02-19 08:31:54,321 [256] ERROR EPiServer.Global: 1.2.5 Unhandled exception in ASP.NET
2017-02-19 08:31:54,352 [272] ERROR EPiServer.Global: 1.2.5 Unhandled exception in ASP.NET
2017-02-19 08:31:54,399 [118] ERROR EPiServer.Global: 1.2.5 Unhandled exception in ASP.NET
2017-02-19 08:31:54,430 [155] ERROR EPiServer.Global: 1.2.5 Unhandled exception in ASP.NET
2017-02-19 08:31:54,477 [244] ERROR EPiServer.Global: 1.2.5 Unhandled exception in ASP.NET
2017-02-19 08:31:54,508 [64] ERROR EPiServer.Global: 1.2.5 Unhandled exception in ASP.NET
2017-02-19 08:31:54,555 [169] ERROR EPiServer.Global: 1.2.5 Unhandled exception in ASP.NET
2017-02-19 08:31:54,586 [154] ERROR EPiServer.Global: 1.2.5 Unhandled exception in ASP.NET
2017-02-19 08:31:54,617 [60] ERROR EPiServer.Global: 1.2.5 Unhandled exception in ASP.NET
2017-02-19 08:31:54,664 [256] ERROR EPiServer.Global: 1.2.5 Unhandled exception in ASP.NET
Regards
Anders