1

I have created a SQLCLR UDF and am deploying it (using SSDT) to SQL Server 2019 on Linux. When I try to execute the function it returns the following error:

Request for the permission of type 'System.Net.WebPermission, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.

The SQLCLR UDF is calling a web API.

1 Answer 1

0

SQL Server on Linux, for whatever reason (likely not a good one, or at least not a good reason anymore), only allows SAFE code (i.e. code that can execute when the assembly has PERMISSION_SET set to SAFE. This means no code that reaches outside of the database, either for file system, network (including http, ftp, etc), etc. 😿

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.