![](/img/trans.png)
[英]Exception “Security has not been configured for controller” is thrown when ActionNameSelectorAttribute is used
[英]HtmlAgilityPack exception has been thrown when used in deployed SSIS package
尝试读取:sqlserverbuilds.blogspot.com/
使用VS 2017(15.6.4),并利用C#和HtmlAgilityPack 1.7.4将其部署到我的OS2016 SSIS服务器
这些命令运行时:
var html = @"http://sqlserverbuilds.blogspot.com/";
HtmlWeb web = new HtmlWeb();
var htmlDoc = web.Load(html);
我总是得到:
调用的目标已引发异常。
我确保将HTMLAgilityPack.dll正确部署到GAC并经过验证,例如:
C:\...\gacutil>gacutil -l HtmlAgilityPack
Microsoft (R) .NET Global Assembly Cache Utility. Version 4.0.30319.0
Copyright (c) Microsoft Corporation. All rights reserved.
全局程序集缓存包含以下程序集:
HtmlAgilityPack, Version=1.7.4.0, Culture=neutral, PublicKeyToken=bd319b19eaf3b43a, processorArchitecture=MSIL
Number of items = 1
在VS2017中进行测试时,它运行正常,没有错误或问题(在我将其注册到GAC之后)。
因此,这对我来说是一个巨大的疏忽。 遍历SSIS的Log4Net安装建议很有帮助。
看来我在数据库服务器上注册了该dll,但独立的SSIS服务器没有该dll的注册。 我怀疑问题出在SSIS服务器方面。
附带说明一下,为了不需要使用“ gacutil.exe”的任何特殊操作,我从本地计算机(已安装VS2017)复制了gacutil.exe,gacutil.exe.config和gacutlrc.dll到我服务器上的文件夹。 使用这3个文件,我可以毫无问题地注册HtmlAgilityPack.dll。 执行的命令:gacutil -I HtmlAgilityPack.dll
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.