Home » IIS » BadImageFormatException: Bad method token

BadImageFormatException: Bad method token

If you are using AppDynamics version 4.5.17 or lower and receiving “BadImageFormatException: Bad method token” error while trying to access your application hosted on IIS, please update your AppDynamics to mitigate a known issue.

"BadImageFormatException: Bad method token" error
“BadImageFormatException: Bad method token” error

It occurs intermittently and IIS reset temporarily solves it. In the case I worked on, it was happening on both IIS servers (Windows Server 2016). There were not any recent Windows updates or code deployments.

Solution for BadImageFormatException: Bad method token error

This issue in AppDynamics that causes the application crash reported in their documentation.

"BadImageFormatException: Bad method token" error caused by a known AppDynamics issue
This is a known AppDynamics issue

You can also collect a dump file to make sure the issue is caused by AppDynamics.

Please note that BadImageFormatException generally occurs because of using a library with processor architecture (32-bit, 64-bit) that is different than what the application pool is expecting. Here is a similar issue and how to solve it: Attempt to load Oracle client libraries threw BadImageFormatException

Ned Sahin

Blogger for 20 years. Former Microsoft Engineer. Author of six books. I love creating helpful content and sharing with the world. Reach me out for any questions or feedback.
Categories IIS

2 thoughts on “BadImageFormatException: Bad method token”

Leave a Comment