Could not load assembly 64bit machine
I am getting the following error if I try to run the ASP.NET 4.0 website in a 64 bit machine with Enable 32 bit Applications flag set to false. (I have to set that to False, If I set it to true its working fine). > "Could not load file or assembly 'Common.BL' or one of its dependencies. An开发者_如何学C attempt was made to load a program with an incorrect format.
And in the project properties the Target of Build is set to Any CPU.
Still I am getting the same error.
Can you guys please help me resolving this error. Anyhelp would be appreciated.
Thanks. Sameer.
I'd focus on the "or one of its dependencies" portion of the error. Are you referencing a 32-bit assembly or one compiled for a different platform?
Ensure Common.BL is 64 bit. You can check this fairly easily. Check this out for help:
How to determine if a .NET assembly was built for x86 or x64?
Let's use that as a starting point, post the results. If it is a 32 bit and you are on IIS 6, then ALL of IIS must be set to run in 32 bit mode. If you are in IIS 7 then you can set a specific app pool to run in 32 bit mode. Ensure you compile your code for 32 bit though.
精彩评论