Using the same version of Elmah on 32 bit and 64 bit Servers

Tags: .Net

I am only writing this post as I was surprised by how simple it was.  First off if you don't know what Elmah is you should read this article by Scott Hanselman.

My only complaint with Elmah is the fact that there are two versions one that works on 32bit Computers and one that works on 64bit Machines.  I know this isn't too big of a deal but it is just another thing to remember when deploying your web site into multiple environments.

Why does Elmah have 2 versions?

Elmah has two versions in order to allow you to log your Errors using SqlLite(which has a 32bit and 64bit assembly that Elmah is compiled against).  If you plan on logging errors using SqlServer/XML/Oracle/Memory etc you don't need the SqlLite dll.

What do I need to modify to use the same Elmah dll on both 32 bit and 64 bit Servers

Step 1. Get the source from here. http://code.google.com/p/elmah/

Step 2. Open the project and delete the SQLLiteErrorLog.cs file

Step 3. Remove the Reference to SQLite and recompile. Use the dll as you would have with Elmah before.(Note if you only have Visual Studio 2010 the project upgraded to 2010 without errors)

Add a Comment