SQL CLR Stored Procedure and Web Service

荒凉一梦 提交于 2019-12-05 14:37:35

I am just figuring this out, but this is what I got:

You need to set the permission_set when you create the assembly in SQL to UNSAFE.

CREATE ASSEMBLY [<assemblyname>] FROM '<path>/<assemblyname>.dll'
WITH PERMISSION_SET = UNSAFE
GO

If you are using a VS SQL Database Project to do your deployment, this can also be done by setting the Permission to UNSAFE on the Database Tab of Properties for the Database Project.

You should check my blog post

This is Turkish but you can translate with google tool on the page. Just imagine the methods in the Agent class will call your web service. And use your System.Web dependencies instead of System.Management in example.

Hope to check this blog entry which will help you to invoke a web service from SQL stored procedure and overcome security issues you encountered.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!