2010-10-23 130 views
0

,当我在服务器上运行应用程序,我得到:asp.net 4 MVC 2的错误

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中引用文件夹文件?将其设置为CopyLocal?

任何意见或溶液,将不胜感激

--MB

回答

1

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

+0

功能包将安装并包含在应用程序中的dll是不可能的?我猜这不是,这就是为什么你只说,对吧? (并感谢信息) – 2010-10-23 18:41:45

+0

而我们使用的sql server版本是2005. – 2010-10-23 18:58:16

+0

SQL 2005有一个类似的可再发行组件安装包:http://www.microsoft.com/downloads/en/details.aspx?displaylang=en&FamilyID= 536fd7d5-013f-49bc-9fc7-77dede4bb075 – 2010-10-23 19:17:49