After
I am new to using 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 .: Here is my Pre> In your web.config, make sure that you have i.e Also add On your ELMAH , but I have to pass GUID Error page
& 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;
global.asax file contents
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)); }
& lt; Add name = "ErrorLog" type = "Elmah.ErrorLogModule, Elmah" preCondition = "managedHandler" />
Elmah.ErrorLogModule logModule = new Elmah.ErrorLogModule (); LogModule.Logged + = New Elmoh Entreleged Event Handler (logModule_logged); . Elmah.ErrorSignal.FromCurrentContext () (Ex) Raise;
Application_Error function.
Comments
Post a Comment