IIS System.BadImageFormatException solution

I recently received a an error deploying a new IIS site of:

“System.BadImageFormatException: Could not load file or assembly ” or one of its dependencies. An attempt was made to load a program with an incorrect format.”

This is caused by one or more DLLs in the project being 32-bit and trying to deploy to an IIS site without having 32-bit application support enabled.  The solution is to go into the IIS administrator, select the application pool for the site (not the site itself) then select “advanced settings” and then change the “Enable 32-bit applications” from false to true.

badimagefix badimageiis

No comments yet.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Powered by WordPress. Designed by WooThemes