c# - 我在 SQL Server 复制项目中收到 "An attempt was made to load a program with an incorrect format"错误

标签 c# sql-server replication

具体错误如下

Could not load file or assembly 'Microsoft.SqlServer.Replication, Version=9.0.242.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91' or one of its dependencies. An attempt was made to load a program with an incorrect format.

在转移到另一个项目两个月后,我最近再次开始从事这个项目。它之前工作得很好,我已经仔细检查了所有引用资料。

最佳答案

answer by baldy以下是正确的,但您可能还需要在 AppPool 中启用 32 位应用程序。

来源:http://www.alexjamesbrown.com/uncategorized/could-not-load-file-or-assembly-chilkatdotnet2-or-one-of-its-dependencies-an-attempt-was-made-to-load-a-program-with-an-incorrect-format/

在设置应用程序在我的本地机器上运行时(运行 Vista 64 位)我遇到了这个错误:

Could not load file or assembly ChilkatDotNet2 or one of its dependencies. An attempt was made to load a program with an incorrect format.

显然,应用程序使用 ChilKat components , 但我们使用的版本似乎只是 32 位版本。

为了解决这个错误,我在 IIS 中设置了我的应用程序池以允许 32 位应用程序。 打开 IIS 管理器,右键单击应用程序池,然后选择高级设置(见下文)

enter image description here

然后将“启用 32 位应用程序”设置为 True。

enter image description here

全部完成!

关于c# - 我在 SQL Server 复制项目中收到 "An attempt was made to load a program with an incorrect format"错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41449/

相关文章:

c# - 使组合框可编辑

c# - ASP.NET 混合身份验证

sql - bool 表达式作为事务sql中的列值

couchdb - 从设计角度应该如何对待 CouchDB 修订版?

sql-server-2005 - 如何创建 SQL Server 2005 数据库的实时副本?

mysql - 如何将数据导入MySQL主/副本结构

c# - 如何在不使用循环的情况下将行集合(通过 linq 查询获得)分配给数据表?

c# - 如何使用NEST elasticsearch批量插入Json?

sql - 如何获取每个空值的行号?

sql-server - SQL查询结果不返回空值