locked
BadImageFormatException: An attempt was made to load a program with an incorrect format. (Exception from HRESULT: 0x8007000B)]

    Question

  • BadImageFormatException: An attempt was made to load a program with an incorrect format. (Exception from HRESULT: 0x8007000B)]

    I have this error when I try to run a .net 2.0 web application. please help
    Saturday, November 28, 2009 7:05 PM

Answers

  • You are trying to load a 32 bit dll into a 64 bit process (or the other way around)
    • Marked as answer by eryang Friday, December 04, 2009 3:29 AM
    Sunday, November 29, 2009 5:52 PM

All replies

  • You are trying to load a 32 bit dll into a 64 bit process (or the other way around)
    • Marked as answer by eryang Friday, December 04, 2009 3:29 AM
    Sunday, November 29, 2009 5:52 PM
  • Hi,
    It will be helpful if you could provide the exception details and call stack. we need to find out whether the exception is caused by our application or the IIS.

    Thanks,
    Eric
    Please remember to mark helpful replies as answers and unmark them if they provide no help.
    Tuesday, December 01, 2009 9:15 AM
  • Hi,
    It will be helpful if you could provide the exception details and call stack. we need to find out whether the exception is caused by our application or the IIS.

    Thanks,
    Eric
    Please remember to mark helpful replies as answers and unmark them if they provide no help.

    Thanks for your explanation! It's very valuable.
    Wednesday, September 29, 2010 2:06 AM
  • If you try to run 32-bit applications on IIS7 (and/or 64-bit OS machine) you will get the same error. So, from the IIS7  right click on the applications' application pool and go to "advanced settings" and change "Enable 32-Bit Applications" to "TRUE".

    Restart your Website and it should work. 


    Cheers,

    Kalyan Revadi

    Thursday, January 06, 2011 8:04 PM