Quantcast
Channel: .NET Framework inside SQL Server forum
Viewing all articles
Browse latest Browse all 780

Sql Server 2012 Error when creating assembly from System.IdentityModel.dll'

$
0
0

Hello

We are trying to call a WCF from a CLR procedure in Sql Server 2012. We implemented this in Sql Server 2005 and works fine, but now we want to upgrade it to 2012. The database has trustworthy set "on".

When we run this command:

     CREATEASSEMBLY 

     [System.IdentityModel]from'C:\Windows\Microsoft.NET\Framework64\v4.0.30319\System.IdentityModel.dll'

    withpermission_set=UNSAFE

we receive this error:

CREATE ASSEMBLY for assembly 'System.IdentityModel' failed because assembly 'System.IdentityModel' 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

[ : System.IdentityModel.SafeKeyHandle::SafeCryptImportKey][mdToken=0x600014c][offset 0x00000033] Unmanaged pointers are not a verifiable type.

[ : System.IdentityModel.SecurityBufferDescriptor::.ctor][mdToken=0x600024b][offset 0x00000017][found Native Int][expected unmanaged pointer] Unexpected type on the stack.

[ : System.IdentityModel.SafeDeleteContext::InitializeSecurityContext][mdToken=0x6000254][offset 0x0000033F][found Native Int][expected address of Native Int] Unexpected type on the stack.

[ : System.IdentityModel.SafeDeleteContext::InitializeSecurityContext][mdToken=0x6000254][offset 0x000000A7][found address of value 'System.IdentityModel.SecurityBufferStruct'][expected address of Native Int] Unexpected type on the stack.

[ : System.IdentityModel.SafeDeleteContext::InitializeSecurityContext][mdToken=0x6000254][offset 0x000000B2][found address of Native Int] Expected numeric type on the stack.

[ : System.IdentityModel.SafeDeleteContext::InitializeSecurityContext][mdToken=0x6000254][offset 0x00000338][found Native Int][expected address of Native Int] Unexpected type on the stack.

[ : System.IdentityModel.SafeDeleteContext::InitializeSecurityContext][mdToken=0x6000254][offset 0x000001CD][found address of value 'System.IdentityModel.SecurityBufferStruct'][expected address of Native Int] Unexpected type on the stack.

[ : System.IdentityModel.SafeDeleteContext::InitializeSecurityContext][mdToken=0x6000254][offset 0x000001D2][found address of Native Int] Expected numeric type on the stack.

[ : System.IdentityModel.SafeDeleteContext::InitializeSecurityContext][mdToken=0x6000254][offset 0x000001C1][found Native Int][expected address of Native Int] Unexpected type on the stack.

[ : System.IdentityMode...

We tried to target a previous version of .Net framework  but without success (I don't know hot to setup Sql Management Studio to use a different .Net Framework).

Do you have any idea what to try?

Thank you very much


Viewing all articles
Browse latest Browse all 780

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>