Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Accessing external assemblies for SQLCLR
Message
From
06/09/2007 07:58:31
 
General information
Forum:
Microsoft SQL Server
Category:
Security
Environment versions
SQL Server:
SQL Server 2005
Miscellaneous
Thread ID:
01252124
Message ID:
01252678
Views:
11
Hi Sergey,

Thanks for the link. I read that and a few others of a similar nature and am pretty sure that my problem was(my italics, see below) with the .NET permissions rather than any SQL settings. There appears to be a whole bunch of .NET DLLs that can't be accessed at runtime with the 'External Access' permissions and I'm unclear as to whether they can even be loaded in 'Unsafe' mode.

However, in an attempt to find out whether the above is true, I'm in a worse position than ever. I tried changing the SQL settings to grant 'Unsafe Assembly' permissions and now can't even load the assembly into SQL in either 'Unsafe' or 'External Access' modes - only marking it as 'Safe' works.

One of those days,
Viv

>See if http://www.code-magazine.com/article.aspx?quickid=0603031&page=1 can help.
>
>>
>>I need to access a couple of external assemblies for a SQLCLR assembly. AFAICS one way to do this is to:
>>(a) Set the permission level to 'External' in the .NET project.
>>(b) Grant the dbo of the relevant database 'External Access Assembly' permissions
>>(c) Mark the relevant database as 'Trustworthy'
>>
>>I've done all three but still get a permissions error when the CLR tries to access the System.Runtime.Serialization.dll module.
>>
>>Can anyone suggest what else might be required?
>>Regards,
>>Viv
Previous
Reply
Map
View

Click here to load this message in the networking platform