Without using a COM+ proxy service, I’m quite happily able to use classes from a 32 bit COM interop library from a .NET application compiled with target AnyCPU, running in a 64 bit w3wp process.
I’m successfully instantiating classes from a 32 bit COM interop library in a 64 bit .NET process.
w3wp is running in 64 bit mode, and the IIS configuration is set to not allow 32 bit applications. Ontop of that is the fact that there’s a specifically x64 compiled and registered .NET assembly down the line.
I’m just wondering, how is this at all possible?
Of interest is that this works just beautifully if the code is compiled with Visual Studio 2008, targeting the 3.5 framework. If the same code is compiled with Visual Studio 2010, targeting the 3.5 framework, the application fails spectacularly when it tries to load the 32 bit COM interop library. As it should.
I’ll chalk this up to some complexity in the tonnes of code and projects that the solution consists of. Removing the requirements of the offending library to be 64 bits has solved the issue, but naturally doesn’t answer the question. It just makes it obsolete.