jonot / elmah

Automatically exported from code.google.com/p/elmah
Apache License 2.0
0 stars 0 forks source link

System.Data.SQLite.dll causes image problems on 64-bit IIS/ASP.NET #98

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Publish to IIS running the connection pool as 64bit service.
2. Run website.
3. Depending on how website is published the error generated and reported
by IIS may be different.

If the website is *not* precompiled this error is reported:

Could not load file or assembly 'system.data.sqlite' or one of its
dependencies. An attempt was made to load a program with an incorrect format.

Exception Details: System.BadImageFormatException: Could not load file or
assembly 'system.data.sqlite' or one of its dependencies. An attempt was
made to load a program with an incorrect format.

What is the expected output? What do you see instead?

I believe that sqllite is a 32bit C++ Com dll when the 64 bit ASP process
tries to compile the code it finds this 32bit image dll and cannot work
with it.

You need to provide a version with the 64 bit version of sqlite.

What version of the product are you using? On what operating system?

Version 1 Beta 3

Please provide any additional information below.

My site worked fine on 32bit versions on multiple systems. Once I published
to a 64bit operation this assembly could not be digested by the compilation
process on Asp.net.

WorkAround: Set the conneciton pool running to the site in IIS to be a
32bit service and not a 64bit service. *sigh* not an option for me.

Original issue reported on code.google.com by william....@gmail.com on 8 May 2009 at 2:49

GoogleCodeExporter commented 9 years ago
Compiling ELMAH from source against the 64-bit version of System.Data.SQLite.dll
seems to fix the problem. But it would be really cool if I didn't have to make 
two
versions of my application just because of SQLite.

Original comment by joel.mue...@gmail.com on 8 May 2009 at 4:56

GoogleCodeExporter commented 9 years ago

Original comment by azizatif on 11 May 2009 at 6:11

GoogleCodeExporter commented 9 years ago
I've just integrated ELMAH into our application and have come across this 
problem.

Unfortunately our DEV environment is 32 bit and our target deployment 
environment is 
64 bit. Our problem I know but that's the current position I'm in.

A also tried changing the web.config to use a Elmah.MemoryErrorLog but this 
does not 
help as the SQLite assembly reference is still in place. Perhaps I could 
recompile 
ELMAH myself without this in place.

The AppPool setting to 32-bit does work but I'm not happy with our logging 
solution 
forcing this on the application as a whole.

Original comment by mgho...@gmail.com on 25 May 2009 at 3:03

GoogleCodeExporter commented 9 years ago

Original comment by azizatif on 27 May 2009 at 3:42

GoogleCodeExporter commented 9 years ago
Fixed in r594. A new download will be made available for x64.

Original comment by azizatif on 27 May 2009 at 6:00

GoogleCodeExporter commented 9 years ago
Now available for download:
http://code.google.com/p/elmah/downloads/detail?name=ELMAH-1.1-RC-bin-x64.zip

Original comment by azizatif on 28 May 2009 at 10:04

GoogleCodeExporter commented 9 years ago
If Managed SQLite has enough functionality, it would remove the need to have 
multiple
versions of Elmah (and by extension, multiple versions of my application). As it
stands, I'm still going to be compiling a version of Elmah that doesn't 
reference any
SQLite DLL, as I don't need the headache of distributing separate 32-bit and 
64-bit
versions of my app.

http://code.google.com/p/managed-sqlite/

Original comment by joel.mue...@gmail.com on 9 Jun 2009 at 4:47

GoogleCodeExporter commented 9 years ago
@joel.mueller: Perhaps you should open your suggestion as a new issue along the 
lines
of, "Consider using a pure managed implementation of SQLite."

Original comment by azizatif on 9 Jun 2009 at 5:00

GoogleCodeExporter commented 9 years ago
I downloaded the latest version (1.1 x64 Aug 17) I can can't build the 64 bit 
version
due to bad image reported in Studio. 

(0): Build (web): Could not load file or assembly 'System.Data.SQLite,
Version=1.0.61.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139' or one of 
its
dependencies. An attempt was made to load a program with an incorrect format.

When I look at VSTADB.NET20.DLL using the 64bit version of Depends.exe it 
reports
taht vstadb is x86 and not x64. 

Please advise 

Original comment by william....@gmail.com on 24 Nov 2009 at 6:07

GoogleCodeExporter commented 9 years ago
This issue is closed. Please create a new issue specific to the problem you're 
experiencing. Thanks.

Original comment by azizatif on 24 Nov 2009 at 7:03

GoogleCodeExporter commented 9 years ago
Even though you couldn't fix your situation, I thought it wise to let you know 
that you 
helped me sort out my own. thanks!

Original comment by irwin.williams on 5 Feb 2010 at 4:53