BadImageFormatException for a 64-bit ASP MVC web application

Updated on Tuesday, March 16, 2021

System.BadImageFormatException for a 64-bit web application in IIS Express

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.)

(All Code Posts)

Winter Solstice 2019

Updated on Sunday, May 3, 2020

Upload

(Previously)

It's the start of Winter (or Summer if you're south of the Equator). Rendered in Catfood Earth, showing December 22 at 04:19 UTC.

(All Code Posts)

Trees

Updated on Sunday, May 3, 2020

Catfood.Shapefile 1.60

Updated on Sunday, May 23, 2021

I just released Catfood.Shapefile 1.60. This contains a fix from Libor Weigl that factors out the enumerator so that you can still access the shapefile after enumeration.

Catfood.Shapefile is a .NET library for parsing ESRI Shapefiles.

(previously)

(All Code Posts)

Book reviews for November 2019

The Last Patriot (Scot Harvath, #7) by Brad Thor

The Last Patriot (Scot Harvath, #7) by Brad Thor

2/5

 

The Apostle (Scot Harvath, #8) by Brad Thor

The Apostle (Scot Harvath, #8) by Brad Thor

3/5

 

Foreign Influence (Scot Harvath, #9) by Brad Thor

Foreign Influence (Scot Harvath, #9) by Brad Thor

2/5

 

The Athena Project (Athena, #1) by Brad Thor

The Athena Project (Athena, #1) by Brad Thor

3/5

 

The First Commandment (Scot Harvath, #6) by Brad Thor

The First Commandment (Scot Harvath, #6) by Brad Thor

3/5

 

Blue Moon (Jack Reacher, #24) by Lee Child

Blue Moon (Jack Reacher, #24) by Lee Child

5/5

Reacher perfection.

 

Supernova Era by Liu Cixin

Supernova Era by Liu Cixin

3/5

Great concept but disappointing writing.

 

(All Book Reviews)

ITHCWY Newsletter for November 2019

Kidlapse - Make a Movie of Your Child Growing Up

Updated on Saturday, May 29, 2021

Kidlapse - Make a Movie of Your Child Growing Up

Kidlapse is now live. This is a service I've been working on that uses machine learning to recognize faces and then rotate and zoom you so get pretty good alignment between each photo. You upload one photo per month and Kidlapse then creates a timelapse movie of your child growing up. If that sounds like something you'd be interested in sign up and give it a try.

(All Etc Posts)

Transit of Mercury

Transit of Mercury November 11 2019

Detail from Transit of Mercury November 11 2019

The transit of Mercury on November 11, 2019 shot from San Francisco, CA with a Sony RX10 IV with an ND5.0 filter (and a better filter adapter than this one).

(Recent Photos)

ITHCWY Newsletter for October 2019

Bangalore Timelapse

Bangalore, Karnataka, India

Dawn to dusk 60 frame per second timelapse of Bangalore (Bengaluru) in Karnataka, India. Shot on a GoPro Session from the 10th floor of the Sheraton Grand Hotel over two days.

(More Timelapses)