Azman 64 bit using VS2010: BadImageFormatException
I recently upgraded a solution from VS2008 to VS2010. Just a solution upgrade, nothing else. I am targeting .Net 3.5. The solution is set to build build for "any CPU". Now, after the solution upgrade, I get a BadImageFormatException when trying to use Azman:
"Could not load file or assembly 'Interop.AZROLESLib, Version开发者_如何学JAVA=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. An attempt was made to load a program with an incorrect format."
When I set the solution to build 32 bit everything is still fine and Azman works correctly. I'm running this on Windows 7 64 bit by the way. Any ideas what's going on?
Assuming you aren't using Cassini here, Open Internet Information Services (IIS) Manager. Locate and click on your Application Pool for your website. Click on Advanced Settings. There is an option called "Enable 32-Bit Applications" near the top. Set this to True and it should work. We had the same problem.
It seems that the component you are using is a native 32 bit application so you need to explicitly target x86 to make it work. If there's a 64 bit version of Azman you can try installing it.
精彩评论