从ASP.NET运行SSIS包时,为什么会出现类没有注册的错误? [英] Why does class not registered error occur when running SSIS packages from ASP.NET?

查看:701
本文介绍了从ASP.NET运行SSIS包时,为什么会出现类没有注册的错误?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我从我的asp.net应用程序运行SSIS包。如果这是我的本地机器(32位操作系统)上运行,一切工作正常。
但是当我发表我的网站远程计算机(64位操作系统),我得到的运行时错误的:

I run ssis package from my asp.net application. When it's running on my local machine (32-bit OS), everything is working fine. but when I published my site on remote computer (64-bit OS) I was getting run-time error:

Could not load file or assembly 'Microsoft.SqlServer.ManagedDTS, Version=10.0.0.0, 
Culture=neutral, PublicKeyToken=89845dcd8080cc91' or one of its dependencies. The system cannot
find the file specified.

我把 Microsoft.SqlServer.ManagedDTS.dll Microsoft.SqlServer.DTSRuntimeWrap.dll 到我的网站的bin文件夹。

I put Microsoft.SqlServer.ManagedDTS.dll and Microsoft.SqlServer.DTSRuntimeWrap.dll into the bin folder of my web site.

这之后,我有一个错误:

After that I had the next error:

 "An attempt was made to load a program with an incorrect format"

我打开启用32位应用程序选项,在IIS应用程序池,改变平台目标x86的一个项目的属性。

I turned on " Enable 32-Bit Applications" option on iis for application pool and changed platform target to x86 in the properties of a project.

现在我有以下错误:

 Retrieving the COM class factory for component with CLSID {BA785E28-3D7B-47AE-A4F9-4784F61B598A}
 failed due to the following error: 80040154 Class not registered 
 (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG)).

任何想法如何解决呢?
或可能是我朝着错误的方向?
任何帮助是AP preciated。

Any ideas how to fix that? OR may be I'm moving in wrong direction? Any help is appreciated.

推荐答案

阅读主题的 了解本地和远程执行之间的差异 的MSDN上了解远程运行包的概念

MSDN reference:

Read the topic Understanding the Differences between Local and Remote Execution on MSDN to understand the concept of running the packages remotely

You can only run a package outside the development environment on a 
computer that has Integration Services installed

承载你的包应该有服务器的 集成服务 安装。请参考上牌型号方面是如何工作的 集成服务微软文档 的。仅复制的DLL到包应该运行不会解决问题的服务器。

The server that hosts your package should have Integration Services installed. Please consult Microsoft document on how the licensing model works with respect to Integration Services. Copying only the DLLs to the server where the package should run will not resolve the issue.

您可以远程调用包执行,但你仍然需要托管的软件包的服务器上集成服务。

You can remotely invoke the package execution but you still need Integration Services on the server hosting the package.

运行SSIS包编程阅读点的 1 描述有关从ASP.NET执行SSIS包在文章

Running SSIS package programmatically Read the point 1 in the article that describes about executing SSIS packages from ASP.NET

以编程方式使用SSIS对象模型运行包。这是在这里联机丛书中详细讨论: http://msdn2.microsoft.com /en-us/library/ms136090.aspx

Run package programmatically using SSIS Object Model. This is discussed in details in Books Online here: http://msdn2.microsoft.com/en-us/library/ms136090.aspx

好处: 一切都在进程中运行,这是很容易设置变量或在执行前修改包。您还可以得到有关包进度事件或要求其停止通过设置CancelEvent。

Benefits: Everything runs in process, it is very easy to set variables or modify package before executing it. You can also get events about package progress or ask it to stop by setting CancelEvent.

缺点: 显然,这是本地执行 - 你需要同一台机器在您的应用程序运行上安装SSIS。这种方法也无法从.NET 1.1的应用程序中使用,除非它被移动到.NET 2.0(这应该是很容易的事情,在我的经验,提高性能为好)。

Drawbacks: Obviously this is local execution - you need to install SSIS on same machine where your app runs. This method also can't be used from .NET 1.1 application, unless it is moved to .NET 2.0 (which should be very easy to do, and in my experience improves the performance as well).

ASP.NET具体: 的模拟环境不会被传递到其他线程SSIS包创建的,所以数据源的连接不会模拟。此外,ASP.NET可以配置回收工作进程的情况下,消耗了太多的内存,以提高ASP.NET应用程序的可用性。由于SSIS很可能会消耗大量的内存,如果你有大量的数据,就可以触发这个回收和可靠性降低您的应用程序。

ASP.NET specific: The impersonation context does not get passed to additional threads SSIS package creates, so the data source connections will not be impersonated. Also, ASP.NET can be configured to recycle the worker process in case it consumes too much memory to improve availability of ASP.NET application. Since SSIS is likely to consume a lot of memory if you have lots of data, it can trigger this recycling and lower reliability of your application.

这篇关于从ASP.NET运行SSIS包时,为什么会出现类没有注册的错误?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆