elmah

"'Could not load file or assembly 'Elmah' or one of its dependencies. The system cannot find the file specified'' after using Elmah.MVC in NuGet

匆匆过客 提交于 2019-12-12 10:42:25
问题 I have a MVC app, I used http://nuget.org/ to install Elmah for MVC, I Was able to install it and run it successively. After few week reopening Visual Studio I Get this error: Could not load file or assembly 'Elmah' or one of its dependencies. The system cannot find the file specified. Error <httpModules> Line 73: <add name="ErrorLog" type="Elmah.ErrorLogModule, Elmah" /> I tried to add a reference in the project to Elmah.Mvc but with no success. Could you point me out how to fix this problem

What to do if Elmah can't reach the database to log an exception?

佐手、 提交于 2019-12-12 09:45:28
问题 OK, apparently related questions dont seem to address this directly. An exception reaches Elmah, maybe a repository cant reach a database, but then neither can Elmah reach that database. Even if they target different servers, maybe its a network problem. Is there a way to configure fallback logs for Elmah for cases like this, e.g. a text file, message queue, email, sms, etc? If so, where do I start looking to do this, excpt for now the Elmah source code. 回答1: I am usually not so concerned

ELMAH on ASP.NET vNext?

别来无恙 提交于 2019-12-12 08:18:47
问题 Is it possible to configure ELMAH with ASP.NET vNext? If so, how? I am lost as to where even start, given there's not even a web.config anymore. If anyone has or can figure it out, please share with us. Thank you 回答1: ELMAH does not work with ASP.NET 5 because ELMAH (given its name) is based on ASP.NET 4.x's Modules and Handlers (the "MAH" of "ELMAH"). In ASP.NET 5 the replacement for modules and handlers is called middleware. There is a prototype in ASP.NET 5 called "ELM" (Error Logging

ELMAH vs Enterprise Library Exception Handling Block

一个人想着一个人 提交于 2019-12-12 07:13:58
问题 My team is currently in the process of building an ASP.NET MVC application, and we're trying to decide which of these frameworks to implement to deal with error handling and logging. What are the reasons for choosing one of these over the other? 回答1: Personally, I've been using Enterprise Library for a number of our clients and I have yet to use ELMAH. Here's my thoughts on Ent Lib. It will take you a bit to get up to speed with Ent Lib - it's not a 5 second install and start using it thing.

Using ELMAH and Application_Error at the same time

自作多情 提交于 2019-12-11 12:33:34
问题 We have an ASP.NET MVC 3 application that is configured to use ELMAH. We also have code in our Application_Error method like this. Both ELMAH and our custom code log to a database. protected void Application_Error(object sender, EventArgs e) { MvcApplication app = (MvcApplication)sender; HttpContext httpContext = app.Context; Exception ex = app.Server.GetLastError(); HttpException httpException = ex as HttpException; //log the error with our custom logging Server.ClearError(); if (httpContext

ELMAH doesn't insert error logs to SQL DB on production

落花浮王杯 提交于 2019-12-11 12:02:53
问题 I have configured an SQL Server 2008 R2 db for ELMAH as described and works fine on development but not production. Both development and production connection string targets to same db, profiler shows nothing for the insert SP if I run production web site. I do not think its a SQL related problem. I have read some posts like Elmah not working on IIS7 server Elmah 1.2 does not log to SQL on Windows 2008 IIS7.5 Integrated mode (but works locally) but even we have same problem, none of them

elmah - cannot email exceptions

牧云@^-^@ 提交于 2019-12-11 10:25:22
问题 Setting up elmah has been relatively painless for me. Until I tried to use the email facility. I have read through all the previous questions on the subject but just can't get it going. Here are the relevant entries in my web.config file . This just represents one of the many attempts that I have made, this one using gmail and . What am I doing wrong? <elmah> <errorMail from="myusername@gmail.com" to="me@myemail.com" subject="elmah exception" async="true" smtpPort="0" useSsl="true" /> </elmah

404 does not append aspxerrorpath for non aspx pages

懵懂的女人 提交于 2019-12-11 05:50:01
问题 i am using ELMAH to log errors, it works fine for pages with aspx, i.e. eroordfs.aspx but when it has a non aspx extension or no extension, my error page loads with no aspxerrorpath in the url, i think this is the reason that elmah is not logging the error. i am using iis7.5 my web.config details are as follows: <httpErrors errorMode="Custom"> <remove statusCode="500" subStatusCode="-1" /> <remove statusCode="404" subStatusCode="-1" /> <error statusCode="404" subStatusCode="-1"

Elmah and 404s under IIS6

ぃ、小莉子 提交于 2019-12-11 04:54:58
问题 Just wondering if it's possible to get Elmah to log 404s that aren't picked up by the ASP.NET framework - i.e. the 404s that IIS spots and replies to. Presumably this would involve some kind of entry in IIS -> web site properties -> Custom Errors tab. Can't find any reference on how to do this. 回答1: Non-ASP.NET mapped extensions (e.g. static content, classic ASP, etc) will never hit the ASP.NET request pipeline so ELMAH will never know about 404 Not Found's generated by IIS6. You'd need to

Session is null after ResponseRewrite

[亡魂溺海] 提交于 2019-12-11 03:43:36
问题 I am using the custom errors attribute in the web.config to handle custom errors Like this: <customErrors mode="On" defaultRedirect="~/Error.aspx" redirectMode="ResponseRewrite" /> After an error is thrown, the page is redirected to the error page, but when I access the session in the error page it is null. The reason I use ResponseRewrite and not ResponseRedirect is because I pass the Exception id through Items using elmah. I even tried to create new empty asp.net website and it still