elmah

Send email from Elmah?

北慕城南 提交于 2019-11-27 16:59:08
Is anyone using Elmah to send exceptions via email? I've got Elmah logging set up via SQL Server, and can view the errors page via the Elmah.axd page, but I am unable to get the email component working. The idea here is to get the email notification so we can react more quickly to exceptions. Here is my web.config (unnecessary sectionss omitted), with all the sensitive data replaced by * * *. Even though I am specifying a server to connect to, does the SMTP service need to be running on the local machine? <?xml version="1.0"?> <configuration> <configSections> <sectionGroup name="elmah">

ELMAH - Using custom error pages to collecting user feedback

只谈情不闲聊 提交于 2019-11-27 14:07:40
问题 I'm looking at using ELMAH for the first time but have a requirement that needs to be met that I'm not sure how to go about achieving... Basically, I am going to configure ELMAH to work under asp.net MVC and get it to log errors to the database when they occur. On top of this I be using customErrors to direct the user to a friendly message page when an error occurs. Fairly standard stuff... The requirement is that on this custom error page I have a form which enables to user to provide extra

ELMAH - Exception Logging without having HttpContext

二次信任 提交于 2019-11-27 10:15:00
问题 I tried this solution with Elmah.XmlFileErrorLog but I'm getting following exception System.ArgumentNullException was unhandled by user code Message="Value cannot be null.\r\nParameter name: context" Source="Elmah" ParamName="context" StackTrace: at Elmah.ErrorSignal.FromContext(HttpContext context) in c:\builds\ELMAH\src\Elmah\ErrorSignal.cs:line 67 at Elmah.ErrorSignal.FromCurrentContext() in c:\builds\ELMAH\src\Elmah\ErrorSignal.cs:line 61 at ElmahHttpErrorHandler.ProvideFault(Exception

Elmah: How to get JSON HTTP request body from error report

岁酱吖の 提交于 2019-11-27 09:25:42
I'm using Elmah to log exceptions. Elmah is great at logging request bodies if the request is a Form-based request (i.e. Content-Type: application/x-www-form-urlencoded), but with JSON based requests where the content type is application/json, the request body is nowhere to be found in the error reports. Anyone know where I can find this request body so that I can properly diagnose my exceptions? UPDATE: 2012-01-03 As a clarification on what I mean by JSON based requests, here's an example raw HTTP request with JSON as the request body: PUT http://mycompany.com/api/v1.0/me HTTP/1.1 Host:

Does elmah handle caught exceptions as well

让人想犯罪 __ 提交于 2019-11-27 09:24:17
问题 Does ELMAH logged exceptions even when they do not bubble up to the application? I'd like to pop up a message when an exception occurs and still log the exception. Currently I've been putting everything in try catch blocks and spitting out messages, but this gets tedious. 回答1: ELMAH has been updated to support a new feature called Signaling. This allows you to handle exceptions how you want, while still logging them to ELMAH. try { int i = 5; int j = 0; i = i / j; //Throws exception } catch

Exception Logging for WCF Services using ELMAH

六眼飞鱼酱① 提交于 2019-11-27 06:03:01
We are using the excellent ELMAH to deal with unhandled exceptions in an ASP.NET 3.5 web application. This works extremely well for all of the site apart from WCF services which are being consumed using the REST features. When an exception occurs within the operation methods that is not handled by the application code, WCF handles it in various ways depending on the service contracts and configuration settings. This means that the exception does not end up firing the ASP.NET HttpApplication.Error event that ELMAH uses. The two solutions I am aware of to deal with this are: Wrap all method

Can't access /elmah on production server with Elmah MVC?

China☆狼群 提交于 2019-11-27 05:26:57
问题 I installed the elmah.mvc nuget package and kept the default configuration of that sans setting up sending an email and plugging it into a SQL database. On my local machine when I use the Visual Studio host, I can open my app and access /elmah fine to see a report of the errors. However, when I try and access /elmah on production, I get two errors, first I get a 403 access is denied server error. Then in my email (from elmah) I get: System.Web.HttpException: Server cannot set status after

Handle exceptions in web services with Elmah

烈酒焚心 提交于 2019-11-27 04:30:00
问题 Is there a way to globally handle exceptions in regular ASP.NET Web Service (asmx) using ELMAH like we do it in ASP.NET web site ? 回答1: ASP.NET web services never fire Application_Error event and exceptions cannot be handled globally by ELMAH like in ASP.NET apps. But we can "manually" log exceptions using ELMAH: public int WebServiceMethod() { try { ... } catch (Exception ex) { Elmah.ErrorLog.GetDefault( HttpContext.Current).Log(new Elmah.Error(ex, HttpContext.Current)); } } 回答2: You can use

Send email from Elmah?

柔情痞子 提交于 2019-11-26 22:30:46
问题 Is anyone using Elmah to send exceptions via email? I've got Elmah logging set up via SQL Server, and can view the errors page via the Elmah.axd page, but I am unable to get the email component working. The idea here is to get the email notification so we can react more quickly to exceptions. Here is my web.config (unnecessary sectionss omitted), with all the sensitive data replaced by * * *. Even though I am specifying a server to connect to, does the SMTP service need to be running on the

Elmah not working with asp.net site

China☆狼群 提交于 2019-11-26 21:17:22
I've tried to use elmah with my asp.net site but whenever I try to go to http://localhost:port/elmah.axd I get resource not found exception. My web.config is given below. <?xml version="1.0"?> <configuration> <configSections> <sectionGroup name="elmah"> <section name="security" requirePermission="false" type="Elmah.SecuritySectionHandler, Elmah"/> <section name="errorLog" requirePermission="false" type="Elmah.ErrorLogSectionHandler, Elmah" /> <section name="errorMail" requirePermission="false" type="Elmah.ErrorMailSectionHandler, Elmah" /> <section name="errorFilter" requirePermission="false"