SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 SQL Server 2012 Forums
 SQL Server Administration (2012)
 Permission_Set Unsafe
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

gregoryagu
Yak Posting Veteran

80 Posts

Posted - 10/11/2013 :  10:38:40  Show Profile  Reply with Quote
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
Flowing Fount of Yak Knowledge

USA
6062 Posts

Posted - 10/11/2013 :  11:27:36  Show Profile  Reply with Quote
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
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.05 seconds. Powered By: Snitz Forums 2000