Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2012 Forums
 SQL Server Administration (2012)
 Permission_Set Unsafe

Author  Topic 

gregoryagu
Yak Posting Veteran

80 Posts

Posted - 2013-10-11 : 10:38:40
I need to install an assembly for use in a CLR stored procedure. When I try to install, it gives the following message:

Msg 6218, Level 16, State 2, Line 3

CREATE ASSEMBLY for assembly 'RebexTest' failed because assembly 'Rebex.Common' 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

[ : MyApp.Security.Certificates.CertificateStore::Exists][mdToken=0x60003b0][offset 0x000000C7] Method is not visible.

This can be resolved by setting the permission set to "Unsafe". However, this is not allowed, so I am trying to modify the assembly code so that it does not need this permission set.

So my question is, what exactly is the error message saying is wrong with CertifcateStore::Exists? It states "Method is not visible" but what does this mean and what needs to be changed to resolve?

TG
Master Smack Fu Yak Hacker

6065 Posts

Posted - 2013-10-11 : 11:27:36
Check your .net version for your project.
From MSDN site:
quote:
SQL Server 2005 and SQL Server 2008 only support SQL Server projects that were built with the 2.0, 3.0, or 3.5 version of the .NET Framework. If you try to deploy a SQL Server project to SQL Server 2005 or SQL Server 2008, an error appears: Deploy error (SQL01268): .NET SqlClient Data Provider: Msg 6218, Level 16, State 3, Line 1 CREATE ASSEMBLY for assembly 'AssemblyName' failed because assembly 'AssemblyName' failed verification. Check if the referenced assemblies are up-to-date and trusted (for external_access or unsafe) to execute in the database (where AssemblyName is the name of the assembly that you are deploying).


Be One with the Optimizer
TG
Go to Top of Page
   

- Advertisement -