Daniel Magin’s Weblog

My life in the Developers World

dbxint.dll not found in asp.net 64bit application and Delphi Prism

I created a new Delphi Prism Project on my new Windows 2008 64-bit machine. The developing process direct on this machine incl. Delphi Prism (last version) incl. in the backend a Interbase 2009 server. The asp.net application is communicating over dbxpress the .net stuff in delphi prism and interbase driver in a nice and easy to develope way.

The Application is running fine during development process with Delphi Prism. After deploying in IIS7 and Windows 2008 64-bit i get the message dbxint.dll not found. After hours of searching i was absolute shure the dll’s are in the correct place.

Ok after checking if all drivers and assemblies are in system path the error message did not gone away. so i found also a similar old bug report in qc here.

I found out the application is running on a 32bit OS fine, but i don’t like to deinstall my complete server and to install agin a 32 bit version of windows 2008. that’s not the way i like to go.

so i was checking the new features how can i tell IIS7 to work with a 32 and 64bit .net framework parallel. again some hours of reading the new configuration stuff i found out YES IT CAN!

In IIS7 (not in earlier versions) you can create manual in a special configuration file by hand exact this stuff. first you have to open C:\Windows\System32\inetsrv\config the file:  applicationHost.config

Search for <applicationPools>

you see in this sections all your IIS Web Pools.

Now we are Creating two diffrent Pools one for asp.net with 64 and one with 32 bit support, with adding this lines in this section:

 

 <add name=”MyAppPool32bit” autoStart=”true” enable32BitAppOnWin64=”true” />
 <add name=”MyAppPool64bit” autoStart=”true” enable32BitAppOnWin64=”false” />

 <add name=”MyASPNET32bit” autoStart=”true” enable32BitAppOnWin64=”true” />
 <add name=”MyASPNET64bit” autoStart=”true” enable32BitAppOnWin64=”false” />

after closing you can find in your IIS7 Administaion Tool both Pools. After changing the pool to MyASPNET32bit  to my Delphi Prism Application with asp.net and dbxpress, all runs fine.

I think something in dbx stuff in .net must have some PInvoke stuff in 32bit or not correct signed or what ever. there is the problem, where the 64.bit stuff will not except. but this is a simple workaraound and i hope the bug will fixed soon.

have fun and regards

daniel magin

Think Delphi

 

 

EDIT: SEE IN COMMENTS A EASY WAY TO DO IT FROM SEBASTIAN GINGTER

Advertisements

May 28, 2009 - Posted by | Embarcadero (CodeGear) stuff

4 Comments »

  1. The solution is somewhat easier:

    I assume in the build settings you set the option Target: All platforms (or AnyCPU). If you change this to only target x86 (and not x64), then your compiled assemblies are flagged in a way that they are not automatically executed as 64bit.

    This is the easiest way to make sure that calls into native 32bit dll’s work WITHOUT the need to change the executing hosts (in your case the IIS) environment settings.

    Also see my older (german) blog entry about this issue:
    http://thespicemustflow.de/post/2007/08/01/74/

    Comment by Sebastian Gingter | May 28, 2009 | Reply

  2. hey basti,

    can you tell me this not before 5 h of searching 🙂
    this costs you a beer next week on german delphi day’s LOL

    yes this is a great idea. ok now my solution is, if you don’t have the source 🙂

    thanks for the great idea

    cu next week

    Comment by dmagin | May 28, 2009 | Reply

  3. Hi Daniel,

    > can you tell me this not before 5 h of searching 🙂

    Probably blogging developers like us should consider posting about the problems before we found a solution, too. Currently we tend to write only about problems we’ve already solved 😉

    > this costs you a beer next week on german delphi day’s LOL
    This would be his 2nd free beer.

    @Sebastian: You’re still getting one as promised for the D7 CD you send me.

    cu next week!

    Comment by Arvid Winkelsdorf | May 29, 2009 | Reply

    • hi arvid,

      yes good idea 🙂

      Comment by dmagin | May 29, 2009 | Reply


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: