IIS 7.5 Fixing An attempt was made to load a program with an incorrect format problem?

Found the problem – The solution is in the way that the two AppPools are configured:

  • Default Website/my_app is using DefaultAppPool where Enable 32-Bit applications is TRUE
  • Beta/my_app -> BetaAppPool is using Enable 32-Bit applications is FALSE

Changing BetaAppPool to set Enable 32-Bit applications to TRUE has fixed this problem.

Solution was found by @Rick on this question: C# Entity Framework 4 Common Language Runtime detected an invalid program error?

Leave a Comment

tech