BadImageFormatException for a 64-bit ASP MVC web application
I converted an ASP.NET MVC web application to 64-bit in order to use dlib and it immediately died with a System.BadImageFormatException (Could not load file or assembly 'xxx' or one of its dependencies. An attempt was made to load a program with an incorrect format.)
Assuming I must have a stray wrong-bittedness something lying around I spent way to long with the assembly binding log viewer (Fuslogvw.exe) trying to figure out what I had messed up. But eventually I realized that Visual Studio was launching a 32-bit version of IIS Express to debug a 64-bit web application.
To fix this select Options from the Tools menu, expand Projects and Solutions, choose Web Projects and then check Use the 64-bit version of IIS Express for web sites and projects. Problem solved.
(Probably shouldn't have this component in the web application - the plan longer term is to move it to an asynchronous process somewhere instead.)
(Related: Monitor page index status with Google Sheets, Apps Script and the Google Search Console API; Using the Azure Monitor REST API from Google Apps Script; Export Google Fit Daily Steps, Weight and Distance to a Google Sheet)
(You might also like: Memo to future: How to reassemble Kate’s cot; Coyote; Correlation is not causation but...)
Add Comment
All comments are moderated. Your email address is used to display a Gravatar and optionally for notification of new comments and to sign up for the newsletter.