elmah

keep getting The view “Error” not found when using Elmah and asp.net mvc 4

自闭症网瘾萝莉.ら 提交于 2019-12-06 13:45:38
问题 I am using Elmah 1.2 as the logging framework for my asp.net mvc 4 application. in the web.config file, I set customErrors mode to on. <customErrors mode="On" defaultRedirect="/Error"> <error statusCode="404" redirect="/Error/NotFound" /> </customErrors> I also created a custom HandleErrorAttribute, copied the code from this link. http://joel.net/logging-errors-with-elmah-in-asp.net-mvc-3--part-4--handleerrorattribute In my Home controller, i just throw an exception to test the logging

Using Elmah with ServiceStack.Mvc

僤鯓⒐⒋嵵緔 提交于 2019-12-06 07:31:38
问题 I could not see unhandled exceptions ( MyService:RestServiceBase) on /elmah.axd path. I've added http handlers for seeing errors. <add verb="POST,GET,HEAD" path="elmah.axd" type="Elmah.ErrorLogPageFactory, Elmah" /> I've installed ServiceStack.Logging.Elmah UPDATE I've installed Elmah.Mvc package also I can get errors in Controller's Action but I could not get service errors! UPDATE I'm not alone :) https://groups.google.com/forum/#!topic/servicestack/WSrM5CLL120 回答1: You need subscribe to

Is it okay to use Elmah instead of try/catch?

北城余情 提交于 2019-12-06 05:53:54
问题 I have been using Elmah for an MVC application and my question is Is it a bad practice to not write try catch statement when using Elmah? 回答1: ELMAH is used to log unhandled exceptions. If you can handle the exception I would strongly suggest that you do. If you still want to log the exceptions to ELMAH, you can do so: try { ... } catch (Exception e) { Elmah.ErrorSignal.FromCurrentContext().Raise(e) } 来源: https://stackoverflow.com/questions/12598773/is-it-okay-to-use-elmah-instead-of-try

NLog, Elmah + shared library

只愿长相守 提交于 2019-12-06 04:18:57
问题 I am trying to come up with a way to create a common library for all my MVC projects. I started off really simple with BaseController and BaseModel classes. Easy stuff! Now in my projects I would like to either use Elmah or NLog for logging exceptions and/or tracing info. Can anyone give me some ideas on the best practices for writing a common library to support both? 回答1: I would use NLog as base for your logging. I've created a small target for NLog which could be used to route exceptions

Is there any ASP.NET application to monitor online user and page view log report?

跟風遠走 提交于 2019-12-06 04:11:38
问题 I've recently seen ElmahR which is very useful to monitor the application's exceptions. Is there any application like ElmahR to monitor online users and trace the user navigation. I've seen some usefull reports in Site Log module in DNN, but I want to use a stand-alone application to monitor online users and get page view reports for any asp.net application. 回答1: something like real time analytics? http://analytics.blogspot.com/2011/09/whats-happening-on-your-site-right-now.html I think you

ELMAH works on local machine, but not on production

浪子不回头ぞ 提交于 2019-12-06 01:32:34
Simple set up, I'm using ELMAH to log exceptions and send me e-mails. Everything works fine on my local machine, but when I put the changes on my production server, errors don't get logged and I don't get e-mails. Here's my web.config on my local machine: <?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

How does one use Elmah in ASP.NET 5/vNext/Core?

↘锁芯ラ 提交于 2019-12-05 20:31:32
问题 I am a bit confused about how to use Elmah in the ASP.NET 5 / MVC 6 projects. I got the package from nuget and it added "Elmah.Mvc": "2.1.2" to dependencies in project.json. I am not sure where to go from here - back in the day, nuget would add entries to the web.config which is now gone. And I can't seem to find any examples on their github or elsewhere. Am I missing something simple? 回答1: Instead of using ELMAH, it's not hard to implement error logging manually. This process will catch any

Elmah.axd on WebAPI 2.2 - No HTTP Resource was found

↘锁芯ラ 提交于 2019-12-05 18:26:05
I'm trying to access /elmah.axd in my broswer, but it returns: {"message":"No HTTP resource was found that matches the request URI 'http://services.domain.com/elmah.axd'."} The server is local (127.0.0.1) and even on that I have my web.config Elmah settings to secure it this way: <elmah> <security allowRemoteAccess="true" /> </elmah> My WebApiConfig looks like: public static void Register(HttpConfiguration config) { // Web API configuration and services // Locally only you will be able to see the exception errors config.IncludeErrorDetailPolicy = IncludeErrorDetailPolicy.LocalOnly; // Web API

Elmah not logging exceptions for http post requests in MVC app - if the request contains XML

蓝咒 提交于 2019-12-05 15:00:21
问题 I've come across a weird problem in my MVC4 (RC) application. (running on .NET 4.0) I have just setup Elmah for logging exceptions / errors. I basically installed the Elmah.MVC and elmah.sqlserver NuGet packages. (versions 2.0.0 and 1.2 respectively) It seemed to work fine out of the box - I can go to the elmah page and view errors: http://myserver/elmah for example, if I create some 404 errors, they appear in this log. What is not working is this: I have a standard MVC controller with a

elmah customized provider and exposed event

天涯浪子 提交于 2019-12-05 14:50:19
I am wondering how do I create my customized provider for storing the error logs, eg. a provider to windows event viewer. If it is not possible so far, I am also wondering is there any exposed events I can override, so that I can inject my code, get the exception, do whatever I want. I know there are some event I can override in Global.asax. like for filtering: void ErrorLog_Filtering(object sender, ExceptionFilterEventArgs e) { } void ErrorMail_Filtering(object sender, ExceptionFilterEventArgs ) { } is there more? where can I find the list of these events? PHeiberg About creating an Elmah