An attempt was made to load a program with an incorrect format” even when the platforms are the same
2012-12-10 16:40
423 查看
下面我说下这个错误的几种解决办法。如果前2个方法还不能解决你的问题。那么请试下第三条。
1.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.
2. Somehow, the Build checkbox in the Configuration Manager had been unchecked for my executable, so it was still running with the old Any CPU build. After I fixed that, Visual Studio complained that it couldn't debug the assembly, but that
was fixed with a restart.
具体请参考: stackoverflow
3. 如果你当前的应用程序在debug模式下可以正常使用,但是你一但publish你的这些dll。他们将不能正常使用,即使你把所有文件都拷贝到指定的虚拟目录。这个时候你需要考虑下你的线程池的配置。尤其是Indentiy的设置。可以尝试用Networkservice。
1.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.
2. Somehow, the Build checkbox in the Configuration Manager had been unchecked for my executable, so it was still running with the old Any CPU build. After I fixed that, Visual Studio complained that it couldn't debug the assembly, but that
was fixed with a restart.
具体请参考: stackoverflow
3. 如果你当前的应用程序在debug模式下可以正常使用,但是你一但publish你的这些dll。他们将不能正常使用,即使你把所有文件都拷贝到指定的虚拟目录。这个时候你需要考虑下你的线程池的配置。尤其是Indentiy的设置。可以尝试用Networkservice。
相关文章推荐
- BadImageFormatException or An attempt was made to load a program with an incorrect format
- ASP.NET 解决An attempt was made to load a program with an incorrect format.问题
- (C#) System.BadImageFormatException: An attempt was made to load a program with an incorrect format.
- 64bit系统运行32位Web程序出现错误:An attempt was made to load a program with an incorrect format
- 解决An attempt was made to load a program with an incorrect format.问题
- Could not load file or assembly An attempt was made to load a program with an incorrect format.
- An attempt was made to load a program with an incorrect format
- ASP.NET: System.BadImageFormatException: An attempt was made to load a program with an incorrect format. on Win7 64bit
- Could not load file or assembly ... An attempt was made to load a program with an incorrect format.
- Attempt to load Oracle client libraries threw BadImageFormatException. This problem will occur when running in 64 bit mode with the 32 bit Oracle client components installed.
- An application has made an attempt to load the C runtime library incorrectly.
- tomcat警告解决办法:WARNING: An attempt was made to authenticate the locked user
- WARNING: An attempt was made to authenticate the locked user "tomcat"
- 无法注册 msvcr80.dll:An application has made an attempt to load the C runtime library incorrectly
- tomcat提示警告: An attempt was made to authenticate the locked user"tomcat"
- tomcat报警告 An attempt was made to authenticate the locked user
- tomcat报警告 An attempt was made to authenticate the locked user
- 关于an attempt was made to authenticate the locked user 的问题的想法
- AM org.apache.catalina.realm.LockOutRealm authenticate WARNING: An attempt was made to authenticate the locked user "tomcat"
- chrome javascript Uncaught SecurityError: An attempt was made to break through the security policy of the user agent