0 Replies - 3260 Views - Last Post: 12 November 2013 - 10:20 PM

#1 trevster344   User is offline

  • The Peasant
  • member icon

Reputation: 225
  • View blog
  • Posts: 1,526
  • Joined: 16-March 11

Accessing a 32 bit dll from an asp.net application on a 2008 server

Posted 12 November 2013 - 10:20 PM

Hi there folks,

I've been trying to access a database dll from a 3rd party that I've been using for years now. The dll is 32 bit. When I try to access it I get the error:

An attempt was made to load a program with an incorrect format. (Exception from HRESULT: 0x8007000B)

I've already looked into the error and found it has something to do with my application being 64 bit and trying to access a 32 bit dll. I've enabled the "Enabled 32-Bit Applications" property in my application pool to true in iis 7 but I still get the error. A few months back I had access to a Windows 2008 server just like this one, and when I changed this boolean everything worked just fine. Now I'm on a different server and my application will not stop displaying this error. Is there anything I've missed in setting up my application in iis7 that could be causing this? I've also tried setting my application to compile in x86 and x64 in case the any cpu option wasn't working but alas no hope.

I was previously on a 2003 server and it did the same thing but from what I could find that was due to the fact that Windows 2003 servers can't work with 32 bit worker processes and 64 bit simultaneously. I've done a lot of research on this, but I'm really hoping someone here has some experience with this issue. Thanks.

Edit: I really hate figuring things out at the end of my rope. For those who have not been able to figure out this issue after enabling 32 bit applications, go into the aspx property of the asp application, and make sure the application pool is set to the correct application pool. Mine was set to a default application pool of another web application, and thus it did not see the property was set to true.


This post has been edited by trevster344: 13 November 2013 - 09:20 AM

Is This A Good Question/Topic? 0
  • +

Page 1 of 1