Feb 9, 2012

Msg 6522, Level 16, State 1, A .NET Framework error occurred during execution of user-defined routine or aggregate System.Security.SecurityException: Request failed. System.Security.SecurityException: at

Msg 6522, Level 16, State 1, A .NET Framework error occurred during execution of user-defined routine or aggregate System.Security.SecurityException: Request failed. System.Security.SecurityException: at 

You may get this error while creating CLR objects in sql server

Solution: 

Step 1: Open solution explorer in visual studio

Step 2: Double click on your project (My project)

Step 3: Select database

Step 4: Choose Permission level Unsafe (You can also check External)

1 comment: