is not a valid Win32 application. (Exception from HRESULT: 0x800700C1)解决方法
情景:当我们用VS2005开发一个web程序时,在WIN2003或WIN2008的32位操作系统上运行正常时,而部署到win2008 R2的64位操作系统(注:目前win2008 R2只有64位操作系统)出现
Server Error in '/CMISWebAdminDevelopment' Application.
Exception Details: System.BadImageFormatException: is not a valid Win32 application. (Exception from HRESULT: 0x800700C1)
Source Error:
Stack Trace:
Version Information: Microsoft .NET Framework Version:2.0.50727.42; ASP.NET Version:2.0.50727.42
solve method 如下:
Server Error in '/CMISWebAdminDevelopment' Application.
is not a valid Win32 application. (Exception from HRESULT: 0x800700C1)
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.Exception Details: System.BadImageFormatException: is not a valid Win32 application. (Exception from HRESULT: 0x800700C1)
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. |
Stack Trace:
[BadImageFormatException: is not a valid Win32 application. (Exception from HRESULT: 0x800700C1)] |
Version Information: Microsoft .NET Framework Version:2.0.50727.42; ASP.NET Version:2.0.50727.42
solve method 如下:
1. Inside IIS (7) click on Application Pools.
2. Find the Application Pool that is configured for your web application in the list.
3. Select it, then click Advanced Settings on the right.
4. Second setting in the list: Enable 32-Bit Applications - must be set to True.
5.identity -should be set to localsystem
注:操作系统是英文版,所以大部分是英文信息。