ASP.NET Error: Could not load file or assembly ‘Some.dll’ or one of its dependencies. An attempt was made to load a program with an incorrect format.

I was testing an ASP.NET application installation on a test server recently and ran into the following error when I ran the application.

Could not load file or assembly 'Some.dll'' or one of its dependencies. An attempt was made to load a program with an incorrect format.

I hadn’t seen this during development on my local machine and a quick bit of searching led to an answer. I have a 32-bit development machine and I was testing on a 64-bit platform.  In IIS 7 and later, ASP.NET 4.0 application pools don’t allow 32-bit applications by default when using an installer like we use. A simple flip of the Enable 32-bit Applications flag in the Advanced Settings of the application pool configuration did the trick to let things run fine and dandy.

Check out the screenshots for a little more guidance and thanks to this post for some guidance. Just make sure to set the Enable 32-bit Applications option to True and you should be ready to go.

IIS Application Pool Advanced Configuration: Enable 32-bit Applications

IIS Application Pool Advanced Configuration

Comments are closed.

Sign in
classic
Forgot password?
×
Sign up

(*) Required fields

I agree with OptimaSales Terms & Privacy Policy

×