ADO.NET 2.0: Assembly not authorized for PERMISSION_SET = EXTERNAL_ACCESS

  • I have developed in a User Defined Function in ADO.NET 2.0.

    When I tried to deploy it I got the following message (Visual Studio):

    “CREATE ASSEMBLY for assembly 'SqlUDFDirectoryListing' failed because assembly 'SqlUDFDirectoryListing' is not authorized for PERMISSION_SET = EXTERNAL_ACCESS.  The assembly is authorized when either of the following is true: the database owner (DBO) has EXTERNAL ACCESS ASSEMBLY permission and the database has the TRUSTWORTHY database property on; or the assembly is signed with a certificate or an asymmetric key that has a corresponding login with EXTERNAL ACCESS ASSEMBLY permission.”

    I tried:

    1. Grant the EXTERNAL ACCESS ASSEMBLY permission to dbo.  I couldn’t find this permission in the permission list
    2. Set the TRUSTWORTHY database property to ON.  This property is greyed out.

    What am I doing wrong?

    Thank you very much for your help,

    Dinu

     

  • This was removed by the editor as SPAM

  • The EXTERNAL_ACCESS privilege must be granted to a database user that maps to a WindowsNT user. Usually, this is the SQL Service account.

    This, of course, may be a security risk => consult Books Online for details. Anyway, such privileges must be under strict control - only grant execute privileges for this procedure to a specific group of users.

    The more important question IMHO would be why the assembly needs access to external resources.

     

    ML

    ML

    ---
    Matija Lah, SQL Server MVP
    http://milambda.blogspot.com

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply