I have a C++ DLL that I am attempting to use through a business class object and a DLLImport statement. When I run the code locally on my Windows 7 Pro 64-Bit computer, everything works fine. However when I run the exact same code on my production Windows 2008 R2 SP1 server, I get 400 Bad Requests returned to me. I ended up using a debug tool and determined that IIS out in production is never calling this DLL and thus the errors must be to do with the DLLImport statement not retrieving the DLL.
I never registered the DLL on either my Windows 7 or Server 2008 box and, to be honest, I am using DLLimport statements because I am unable to directly reference the DLL in VS 2010. I have run other DLLs in Production using DLLImport statements without any issue and I cannot figure out why this one is not working.