My assemblies that wrap a third-party DLL work ***fine*** in my windows test harness app, and they ***also*** work fine in a web service when spawned in debug mode (VS 2008 Visual Studio Development Server)! However, the app always crashes when running in the local IIS 7 web server. Here is the crash detail from the event log when running on the local IIS server: 

> 
> Faulting application w3wp.exe, version
>  7.0.6001.18000, time stamp 0x47919413, faulting module ntdll.dll, version
>  6.0.6001.18000, time stamp 0x4791a783, exception code 0xc0000374, fault
>  offset 0x000aada3, process id 0x990,
>  application start time
>  0x01c9b4133281d5d0.
> 
> 
> 

Discussion: I wrote a wrapper around a .NET dll from a third-party (LinkPointTransaction.dll from FirstData), and I wrote some other assemblies that reference that wrapper. As the code is running, a call to the third-party `LinkPointTransaction.LinkPointTxn.Send()` sends the transaction successfully to FirstData over the internet, but my application crashes w3wp.exe somewhere ***during*** that call, before it hits the next line. It does not throw a managed exception that I can see; it just crashes. Works fine everywhere on my machine except in IIS7.

I am running 64bit Vista Home Premium (IIS7), but I enabled 32bit apps in IIS, created a separate AppPool just for this web service, and have forced all of my assemblies to x86. I have tried running the App Pool under my user account with Admin privileges instead of as the Network Service. UAC is turned off. I have tried Integrated and Classic modes. I have explicitly opened the TCP/IP port in my local firewall that the LinkPointTransaction.dll uses to communicate with FirstData. I even have shut my firewall off (behind a router). 

With any of these workarounds that I listed, it ***always*** works in a Windows app and also in a web service inside the VS Development Server, but **never** works in the local IIS server.

The AppPool for the IIS website is in Classic mode. (In response to 
Gidon)