elmah

Secure elmah with ASp.NET security but only to some users

HI, I am developing a ASP.NET App and I want to add elmah. The problem I have is the the users login to the site and the only way I found to secure elmah is to authenticate users, not a specific user. I am using ASP.NET MVC 2 and NET 4. Any Ideas? ...

General logging with ELMAH

Is ELMAH a good tool for general logging (Read: Audit logging)? ...

MVC HandleError attribute not working on Controller.

I am experimenting with the relationship between Elmah and MVC's plumbed in exception handling, and am surprised at the outcome of the following code. This is a brand new, straight from project template MVC application, and I have only added Elmah modules and handlers to the web.config. And of the course the 'throw': [HandleError] pub...

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

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 t...

ELMAH, JSON and XML Export?

I noticed recently that ELMAH has support for exporting details of an exception via JSON and XML. Out of sheer curiosity, why would anyone use this? If I was storing my data in a SQL DB, why not retrieve the value from there? Additionally, the errors are stored in a pseudo xml format already... why export something that's already in x...

Watertight exception handling with Elmah in an MVC application.

I am trying in design a watertight exception handling strategy for an MVC application in which we use Elmah for logging unhandled exceptions. I would like some critique on some of my thoughts. All application exceptions should be handled in the controller layer. Any unhandled exception below that layer should be the result of a reque...

How do I access an unhandled exception in an MVC Error view?

When the HandleError attribute on a controller detects an unhandled exception and redirects to the Error view, I would like to provide the user with a brief description of the error, and an option to email the error to the application administrator. I do have a custom HandleError that notifies Elmah to log the error, but having to look ...

How do you get ELMAH to throw its own exceptions?

There used to be an article at ELMAHs docs site that contained this information, but it seems to have been removed. I think it's as simple as setting a configuration setting in the section, but I haven't a clue what it is Can anyone take a few seconds and drop the configuration setting here? ...

How can I get Elmah to send email using our email gateway web service?

I realise this would require some sort of custom ErrorMailModule, but where do I start, if I can even do this? ...

Filtering signalled exceptions out of Elmah error mails.

I've implemented a wrapper method around Elmah's Error Signaling, where a raised exception is only seen by Elmah for logging and mailing, but now I'd like to filter only these signalled exceptions out of the mailing, but still log them. How can I do this? This is my simple wrapper: public void LogException(Exception exception) ...

ELMAH Logging Variables

Hi, Does anyone know if there is a patch or anything kicking around for ELMAH that will extend its logging capabilities to include variables and/or session variables. Sometimes the errors i am logging are hard to trace without a bit more info. If there is nothing i might have a go at altering myself Cheers Luke ...

Log4Postsharp (dead?) with postsharp 2.0 or drop for ELMAH ?

Hi there, Does anyone know if the latest build (march 2010 - i beleive called log4postsharp 2.0) is compatible with postsharp 2.0 community edition? I have used postsharp 1.5 together the log4postsharp in the past and was very pleased with the outcome. But log4postsharp seems to be dead, is this true? SHould i concentrate more on ELM...

Unable to log Code 500 Errors in ELMAH

On my ASP.NET 4.0 MVC project running in IIS 7 I have set up and configured ELMAH to log errors on my site. However, I am unable to get any reporting on errors with code 500. I set up a simple controller that creates a divide-by-zero exception, but ELMAH does not log it. I can get ELMAH to log other messages just fine and I am not filt...

Securing ELMAH with no admin accounts

Hi all, I'm wanting to secure ELMAH in an internet facing application. The system uses Forms Authentication, but doesn't currently have any non-user accounts (e.g. Admins). The user accounts are set up in an automated fashion. I don't really want to shoehorn any admin accounts into the system (the current DB schema for the users would ...

ELMAH Error Signalling (ASP.NET)

I've got the code below up and running. It captures the user name and the browser that was used to access an intranet site. How can I modify the code so that ELMAH logs a specific StatusCode to the ELMAH_Error table in SQLServer? The eventual goal is the ability to extract out of the log these specific log entries to identify which PC's ...

Using ELMAH in medium trust

Hi, I'm building an ASP.net mvc app, and am having some problems getting ELMAH deployed using xml logging to a medium trust server, though it works fine on my local machine. It keeps getting a 404 error. The problem might be that the host doesn't allow relative filepaths, so the "~/App_Data" doesn't work for logging. I switched tha...

Use Elmah with twitter and its mandatory oauth authentication?

Since Twitter won't use basic authentication (login, password) anymore, I'm converting my app to using twitter with oauth authentication. In my code this was ok, but I also use Elmah to tweet the errors on a specific twitter account. But it seems Elmah only works with basic authentication. Is it true? Any workaround? Thanks ...

Elmah: ErrorLog_Filtering event handler not called under IIS7

I enable error log filtering within Elmah and want to do it programmatically in a ErrorLog_Filtering event handler. It works well under Visual Studio dev server but as soon as I go under IIS7 (local on my dev machine or remote on my web server), the handler is not called (error logging works well). Here is my usual web.config: <configu...

Deploying 32 or 64bit ELMAH with website depending on server

I am currently building an ASP MVC 2 site and I am looking at hooking ELMAH in for my error logging however I'm not sure how to handle the different build environments. Both my development machine and current test server are 32-Bit and the production server is 64-bit. I can set the MVC site to deploy in x86 and x64 without any problems ...

asp.net mvc - Elmah and partial view

I have a page that contains multiple div's. Action on one div changes the content of other div. Each div loads a partial view from controller. For example- a div for "Search" and another div for "SearchResult". "Search" div contains couple of fields and a button. On click of this button a controller method is invoked asynchronously usi...