简体   繁体   English

将程序集安装到SQL Server中时如何解决失败的程序集验证

[英]How to resolve failed assembly verification when installing assembly into SQL Server

I need to do SFTP from within a SQL Server context. 我需要在SQL Server上下文中执行SFTP。 I can do FTP with MS libraries, but they do not support SFTP. 我可以使用MS库进行FTP,但是它们不支持SFTP。

So I downloaded Rebex, and put together a sample project, and tried to install it into SQL Server as a CLR stored procedure. 因此,我下载了Rebex,并整理了一个示例项目,并尝试将其作为CLR存储过程安装到SQL Server中。

When doing this, SQL Server gives the following message: 执行此操作时,SQL Server将给出以下消息:

Msg 6218, Level 16, State 2, Line 3 Msg 6218,第16级,州2,第3行

CREATE ASSEMBLY for assembly 'RebexTest' failed because assembly 'Rebex.Common' failed verification. 为程序集“ RebexTest”创建组件失败,因为程序集“ Rebex.Common”验证失败。 Check if the referenced assemblies are up-to-date and trusted (for external_access or unsafe) to execute in the database. 检查引用的程序集是否最新且受信任(对于external_access或不安全),以便在数据库中执行。 CLR Verifier error messages if any will follow this message CLR验证程序错误消息(如果有)将跟随此消息

[ : Rebex.Security.Certificates.CertificateStore::Exists][mdToken=0x60003b0] [:Rebex.Security.Certificates.CertificateStore :: Exists] [mdToken = 0x60003b0]
[offset 0x000000C7] Method is not visible. [offset 0x000000C7]方法不可见。

Is there a way to fix this so I can install it into SQL Server? 有没有办法解决此问题,以便可以将其安装到SQL Server中?

Unfortunately, Rebex components can only be used in CLR procedures with the PERMISSION_SET = UNSAFE option. 不幸的是,Rebex组件只能在带有PERMISSION_SET = UNSAFE选项的CLR过程中使用。 See detailed explanation on the Rebex support forum . 请参阅Rebex支持论坛上的详细说明。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM