CLR Integration - verification

User avatar
agibsonsw
SilverLounger
Posts: 2403
Joined: 05 Feb 2010, 22:21
Location: London ENGLAND

CLR Integration - verification

Post by agibsonsw »

Hello. (VB 2010 Express and SQL Server 2008 Express.)

If someone knows about CLR Integration, I've created and built a .dll in VB and am trying to create an assembly in SQL Server. I'm using Windows Authentication
on my (standalone) laptop.

CREATE ASSEMBLY ClassLibrary1
FROM 'C:\Users\Andrew\Documents\Visual Studio 2010\Projects\ClassLibrary1\ClassLibrary1\bin\Release\ClassLibrary1.dll'
WITH PERMISSION_SET = SAFE; GO
-- yields the error message:
CREATE ASSEMBLY for assembly 'ClassLibrary1' failed because assembly 'ClassLibrary1' failed verification. Check if the referenced assemblies are up-to-date and trusted (for external_access or unsafe) to execute in the database. CLR Verifier error messages if any will follow this message

Anyone seen this error message before? How can I 'verify' my assembly? Thanks, Andy.
"I'm here to save your life. But if I'm going to do that, I'll need total uninanonynymity." Me Myself & Irene.

User avatar
HansV
Administrator
Posts: 78463
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: CLR Integration - verification

Post by HansV »

What if you set the database to TRUSTWORTHY and use

WITH PERMISSION_SET = UNSAFE
Best wishes,
Hans

User avatar
agibsonsw
SilverLounger
Posts: 2403
Joined: 05 Feb 2010, 22:21
Location: London ENGLAND

Re: CLR Integration - verification

Post by agibsonsw »

Hello.
No joy. I get the impression I need to sign the Assembly and assign it a key, and perhaps use an ASYMMETRIC key statement in SQL Server?
Tutorials that I've looked at all omit these details, giving a false impression that it's a simple process.
Do you think assigning a key, etc., will fix this error? Thanks, Andy.
"I'm here to save your life. But if I'm going to do that, I'll need total uninanonynymity." Me Myself & Irene.

User avatar
HansV
Administrator
Posts: 78463
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: CLR Integration - verification

Post by HansV »

I'm sorry, I have no experience with this.

If you don't get a satisfying reply here, you might consider posting your question on a board that specializes in SQL Server and/or .NET.
Best wishes,
Hans