Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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 but is there any way I can get it to use the 32bit and 64bit ELMAH binaries on their respective servers without needing to change the referenced DLL between builds?

like image 999
Chao Avatar asked Sep 17 '10 16:09

Chao


2 Answers

The difference between the two editions is due to SQLite since it uses unmanaged code. If you are not using the SQLite provider, it doesn't matter and you can use the same version in both environments. If you are using SQLite then I am not sure how to do this, but I gather most people will use SQL Server in production so won't really run into this issue.

Hope that helps.

like image 146
amarsuperstar Avatar answered Sep 28 '22 04:09

amarsuperstar


I had the same problem, and not using SQLite was not enough to make it work. I tried removing all configuration for SQLite.

I noticed that the SQLite dll was published with my project, so i removed it from the folder containing the Elmah dll. Now my application works in both 32-bit and 64-bit.

like image 44
Pekkasso Avatar answered Sep 28 '22 04:09

Pekkasso