I created user defined type in C#.
When I run this:
EXEC sp_configure 'clr enabled', 1;
RECONFIGURE;
GO
EXEC sp_configure 'show advanced option', '1';
RECONFIGURE;
GO
USE NameOfDatabase
CREATE ASSEMBLY Database1
FROM 'C:\Users\MyDoc\Desktop\Project\Database1\Database1\bin\Debug\Database1.dll'
WITH PERMISSION_SET = SAFE;
CREATE TYPE [dbo].[TypeName] EXTERNAL NAME [Database1].[NameInC#];
I get an error:
Msg 10343, Level 14, State 1, Line 10
CREATE or ALTER ASSEMBLY for assembly 'Database1' with the SAFE or EXTERNAL_ACCESS option failed because the 'clr strict security' option of sp_configure is set to 1. Microsoft recommends that you sign the assembly with a certificate or asymmetric key that has a corresponding login with UNSAFE ASSEMBLY permission. Alternatively, you can trust the assembly using sp_add_trusted_assembly.
How to solve this?