Executable fails with Assembly running in ExternalAccess mod
Spongebob76
Posts: 6
Hi,
I am currently evaluating SQL Packager.
I created an exe and got the following error.
<SQLError Package="SQLPackage"><Error>CREATE ASSEMBLY for assembly 'AcesWebSqlServerMDO' failed because assembly 'AcesWebSqlServerMDO' 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.</Error><Assembly>SQLPackage</Assembly><Package>Package1.resx</Package><Batch>Batch33</Batch><SQL>--Assembly aceswebsqlservermdo, version=0.0.0.0, culture=neutral, publickeytoken=null, processorarchitecture=msil
CREATE ASSEMBLY [AcesWebSqlServerMDO]
AUTHORIZATION [dbo]
FROM 0x4d5a900... More Binary Data here
WITH PERMISSION_SET=EXTERNAL_ACCESS
</SQL></SQLError>
Regards,
Andre
I am currently evaluating SQL Packager.
I created an exe and got the following error.
<SQLError Package="SQLPackage"><Error>CREATE ASSEMBLY for assembly 'AcesWebSqlServerMDO' failed because assembly 'AcesWebSqlServerMDO' 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.</Error><Assembly>SQLPackage</Assembly><Package>Package1.resx</Package><Batch>Batch33</Batch><SQL>--Assembly aceswebsqlservermdo, version=0.0.0.0, culture=neutral, publickeytoken=null, processorarchitecture=msil
CREATE ASSEMBLY [AcesWebSqlServerMDO]
AUTHORIZATION [dbo]
FROM 0x4d5a900... More Binary Data here
WITH PERMISSION_SET=EXTERNAL_ACCESS
</SQL></SQLError>
Regards,
Andre
Comments
I've run into this issue before. I think the only workaround is to create the database manually, run ALTER DATABASE [x] SET TRUSTWORTHY ON, and then instruct the package to run inside the new database that you'd just created. You may want to make sure that you understand the potential security implications of doing it this way, though.