elmah

why do you need Log4Net for nhibernate?

≡放荡痞女 提交于 2021-01-28 02:09:30
问题 I am going to build my application using asp.net mvc3 and nhibernate 3.2. I decided to use Elmah to log all the error messages. I remember nhibernate supports log4net and use it to log all queries. If I dont care about outputting the queries to the log file, I can use nhibernate profiler to do that, what other reasons will stop me swtiching from log4net to Elmah? 回答1: Well, whether you actively use the logging abilities of NHibernate or not, the NHibernate library's code has dependencies on

ElasticSearch+NLog+Elmah实现Asp.Net分布式日志管理教程

偶尔善良 提交于 2020-11-28 00:04:26
ElasticSearch是一个基于Lucene的搜索服务器。它提供了一个分布式多用户能力的全文搜索引擎,基于RESTful web接口。 Elasticsearch是用Java开发的,并作为Apache许可条款下的开放源码发布,是第二流行的企业搜索引擎。设计用于云计算中,能够达到实时搜索,稳定,可靠,快速,安装使用方便。 建立一个网站或应用程序,并要添加搜索功能,令我们受打击的是:搜索工作是很难的。希望我们的搜索解决方案要快,希望有一个零配置和一个完全免费的搜索模式,我们希望能够简单地使用JSON通过HTTP的索引数据,我们希望我们的搜索服务器始终可用,我们希望能够一台开始并扩展到数百,我们要实时搜索,我们要简单的多租户,我们希望建立一个云的解决方案。Elasticsearch旨在解决所有这些问题和更多的问题。 ElasticSearch的Schema与其它DB比较: ElasticSearch三方访问方式: 环境是 CentOS 6.4,安装方法有好几种,在这儿我们直接从官网下载包, 1.71版解压后,进入目录执行: bin/elasticsearch 检查服务是否正常工作 curl -X GET http://localhost:9200/ elasticsearch默认是9200端口,返回一个JSON数据,有版本说明运行正常。 elasticsearch的伸缩性很高

如何让ELMAH使用ASP.NET MVC [HandleError]属性?

允我心安 提交于 2020-08-16 09:20:57
问题: I am trying to use ELMAH to log errors in my ASP.NET MVC application, however when I use the [HandleError] attribute on my controllers ELMAH doesn't log any errors when they occur. 我正在尝试使用ELMAH来记录我的ASP.NET MVC应用程序中的错误,但是当我在控制器上使用[HandleError]属性时,ELMAH在发生错误时不会记录任何错误。 As I am guessing its because ELMAH only logs unhandled errors and the [HandleError] attribute is handling the error so thus no need to log it. 正如我猜测它,因为ELMAH只记录未处理的错误,[HandleError]属性正在处理错误,因此无需记录它。 How do I modify or how would I go about modifying the attribute so ELMAH can know that there was an error and log it.. 我如何修改或如何修改属性

How to set up Elmah with ASP.NET Web API

醉酒当歌 提交于 2020-01-22 04:51:13
问题 I've tried many elmah nugets but they didn't work with ASP.NET Web API. Does anybody knows why? Is there any work around for that? 回答1: There are two options by using ELMAH to capture exceptions in WEB API. If you want to capture errors that are encountered in Actions and Controllers , i.e. in your business logic you can create a ActionFilterAttribute and log those exceptions to ELMAH. example: public class UnhandledExceptionFilter : ExceptionFilterAttribute { public override void OnException

I can't get my Elmah email filters to work

♀尐吖头ヾ 提交于 2020-01-15 05:21:46
问题 I have a query about the following web.config setup and Elmah. The problem is that it I still get emails regarding the public action method issues when I don't want to. The filters I have in place don't seem to be working. I am not entirely sure how the ANDs and ORs are supposed to work in Elmah email filtering, especially as this code is snipped from some project work I have taken onboard from other developers. The tags are meant to prevent any errors from being reported via email that

How to prevent Elmah logging errors handled in a Error Attribute

不问归期 提交于 2020-01-15 03:53:06
问题 I am using Elmah and Elmah.mvc packages in a asp.net, mvc4 web app. I have a specific controller action where I want to handle HttpAntiForgeryExceptions in a specific manner. I have created a custom HandleErrorAttribute that inherits from HandleErrorAttribute and implements IExceptionFilter . Under the specific circumstances I want to handle, I set the ExceptionContext.ExceptionHandled to true. The behaviour that the user sees is correct and the error is handled as I want it to be. However,

Unable to configure mail for Elmah

北城余情 提交于 2020-01-13 10:35:07
问题 I have the following configuration file snippet <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" type="Elmah.ErrorFilterSectionHandler, Elmah" /> <

Errors are logged twice when using Elmah with WebApi

寵の児 提交于 2020-01-13 08:55:42
问题 I'm trying to log exceptions from my asp.net web api project using elmah. I am having an issue where each error is logged twice. I am using Elmah.Contrib.Web-Api and my Application class is as follows: public class WebApiApplication : System.Web.HttpApplication { protected void Application_Start() { GlobalConfiguration.Configuration.Filters.Add(new ElmahHandleErrorApiAttribute()); RouteTable.Routes.MapHubs(); RouteConfig.RegisterRoutes(RouteTable.Routes); #if DEBUG EntityFrameworkProfiler

ASP.NET Invalid character in a Base-64 string

痞子三分冷 提交于 2020-01-12 08:28:23
问题 I recently implemented ELMAH on my site and I have noticed that we frequently get the "Invalid character in a Base-64 string" error. I have never triggered it myself and none of our users have complained about it so I don't know what is going on. From the little I was able to find about it it seems like the viewstate might be getting too big or becoming corrupted or something. Does anybody know what causes this and how to prevent it? Here are what I believe are the pertinent lines in the YSOD

pass the ELMAH error sequence number (not GUID) for the exception to custom error page in ASP.NET

痴心易碎 提交于 2020-01-06 19:24:46
问题 I want to show the sequence number for the exception (from sequence number column in ELMAH_Error table) , not the GUID to the user whenever an error occurs. is this possible? I found this post Problem passing ELMAH log id to Custom Error page in ASP.NET, but it gives the GUID, I would like to know how I can access the sequence number in Logged event of ELMAH component? thanks in advance. 回答1: Some Background... ELMAH is designed to log errors to a specified log source . The most common log