.net - ELMAH : Raise ErrorLog_Logged Event -


After

I am new to using ELMAH , but I have to pass GUID Error page

I have tried what the article talked about and I did not find the error log. Any idea why this is happening? Do I need to add some additional configurations to the web.config file? (Sorry, the code below is already for formatting the code, it can not perform properly)

Thanks,

Here is the contents of my web.config file .:

  & lt ;? XML version = "1.0"? & Gt; & Lt; Configuration & gt; & Lt; ConfigSections & gt; & Lt; Section group name = "telecar.web.ui" & gt; & Lt; Section name = "radScheduler" type = "Telerik.Web.UI.RadSchedulerConfigurationSection, Telerik.Web.UI" allowDefinition = "MachineToApplication" requirePermission = "false" /> & Lt; Section name = "radCompression" type = "Telerik.Web.UI.RadCompressionConfigurationSection, Telerik.Web.UI, PublicKeyToken = 121fae78165ba3d4" allowDefinition = "MachineToApplication" requirePermission = "false" /> & Lt; / SectionGroup & gt; & Lt; Section group name = "elmah" & gt; & Lt; Section name = "security" required display = "false" type = "elm security security handler, elma" / & gt; & Lt; Section name = "error log" required display = "false" type = "elmaha.arol lossactionhandler, elma" /> & Lt; Section name = "error mail" required display = "false" type = "elmah error mailshakes handler, elma" /> & Lt; Section name = "error filter" required = "false" type = "elmoh.errorfilterextensioner, elma" /> & Lt; / SectionGroup & gt;   


Here is my global.asax file contents

Pre> zero errorLog_Logged (object sender, errorLoggedEventArgs args) {// (args.Entry.Error.Exception HandledElmahException) // Return if; Var config = WebConfigurationManager.OpenWebConfiguration ("~"); Var customarsecond = (customarsection) config.GetSection ("system.web / customErrors"); If (CustomArsense! = Faucet) {Switch (CustomArs.section.mode) {Case CustomArrorMod.off: Break; Case CustomErrorsMode.On: FriendlyErrorTransfer (args.Entry.Id, CustomErrorsSection.DefaultRedirect); break; Case CustomErrorsMode.RemoteOnly: (! HttpContext.Current.Request.IsLocal) If FriendlyErrorTransfer (args.Entry.Id, CustomErRorsSection.DefaultRedirect); break; Default: Break; }}} Void FriendlyErrorTransfer (string emlahId, string url) {Response.Redirect (String.Format ("{0}? Id = {1}", url, Server.UrlEncode (emlahId)); }

In your web.config, make sure that you have

  & lt; Add name = "ErrorLog" type = "Elmah.ErrorLogModule, Elmah" preCondition = "managedHandler" />   

i.e

   & Lt; Add name = "error mail" type = "elm. Error mail module, elma" preCondition = "managedHandler" /> & Lt; Add name = "ErrorFilter" type = "Elmah.ErrorFilterModule, Elmah" preCondition = "managedHandler" /> & Lt; / Module & gt;   

Also add

  Elmah.ErrorLogModule logModule = new Elmah.ErrorLogModule (); LogModule.Logged + = New Elmoh Entreleged Event Handler (logModule_logged); . Elmah.ErrorSignal.FromCurrentContext () (Ex) Raise;   

On your Application_Error function.

Comments