Search code examples
sql-serversql-server-2014sql-server-2014-express

Msg 10300, Level 16, State 2, Line 1 in SQL Server 2014


Unable to create Assembly [System.Web] in SQL Server 2014.

The Query is given below.

CREATE ASSEMBLY

[System.Web] from

'C:\Windows\Microsoft.NET\Framework64\v4.0.30319\System.Web.dll' with permission_set = UNSAFE

Throwing an error

Msg 10300, Level 16, State 2, Line 1


Solution

  • ALTER DATABASE DBName SET TRUSTWORTHY On
    use MASTER
    GRANT UNSAFE ASSEMBLY to public
    

    and then Run Command

    CREATE ASSEMBLY
    
    [System.Web] from
    
    'C:\Windows\Microsoft.NET\Framework64\v4.0.30319\System.Web.dll' with permission_set = UNSAFE