asp.net 4 mvc 2错误

时间:2010-10-23 16:05:12

标签: sql-server iis asp.net-mvc-2 replication

当我在服务器上运行应用程序时,我得到:

Could not load file or assembly 'Microsoft.SqlServer.Replication.DLL' or one of its dependencies. This application has failed to start because the application configuration is incorrect. Reinstalling the application may fix this problem. (Exception from HRESULT: 0x800736B1)

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.IO.FileLoadException: Could not load file or assembly 'Microsoft.SqlServer.Replication.DLL' or one of its dependencies. This application has failed to start because the application configuration is incorrect. Reinstalling the application may fix this problem. (Exception from HRESULT: 0x800736B1)

有些观点:

  • 在安装了sql server 2005的计算机上(从中复制了该dll),该应用程序正常运行。但是服务器没有它,所以我需要让它在没有sql server的情况下工作。

  • 该文件位于wwwroot / bin文件夹中:Microsoft.SqlServer.Replication.dll

  • 我是否需要在VS的References文件夹中包含该文件?将它设置为CopyLocal?

非常感谢任何建议或解决方案

- MB

1 个答案:

答案 0 :(得分:1)

Microsoft.SqlServer.Replication.DLL是复制管理对象的一部分,而复制管理对象又是SMO包的一部分。仅支持 的SMO重新分发路径是使用SQL Server功能包下载附带的安装程序,请参阅Distributing an Application That Uses SQL Server Management Objects。您必须在服务器上安装SMO可再发行组件。