SQL CLR execution error
.net, clr, sql, sql-server, sqlclr
Solution
Do not make web calls from triggers. Use a queue do decouple the transactional data operation from the non-transactional HTTP call. Do not make web calls from inside SQL CLR. Use an external process that makes the HTTP call.
Follow the permission requirements for code access as described in CLR Integration Code Access Security:
EXTERNAL_ACCESS assemblies also have the following permissions and values: ... WebPermission Connect: Outbound connections to web resources are allowed.
Problem
I am using visual studio 2012 and MS SQL Server 2012. I created SQL CLR project and followed the steps according to the following link http://blogs.interfacett.com/how-create-net-stored-procedure-sql-server Now when I insert data in the table with which I attached a trigger, the data is inserted, but I get the following error. "Request for the permission of type 'System.Net.WebPermission, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed." Can anyone tell me, how I can fix it? Thanks in advance.