Click here to Skip to main content
15,889,281 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

I am trying to execute the SQL CLR as below

Create assembly [SQLCLR]
from 'C:\Windows\Microsoft.NET\Framework64\v4.0.30319\SQLCLR.dll'
with permission_set=EXTERNAL_Access;

the dll is referenced to another dll (ESEWS.dll) which is consuming web service of our application.

when I run the above sql command, I get the below error

CREATE ASSEMBLY for assembly 'SQLCLR' failed because assembly 'System.ServiceModel.Internals' 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.Runtime.IOThreadScheduler+ScheduledOverlapped::.ctor][mdToken=0x6000185][offset 0x00000023][found unmanaged pointer][expected unmanaged pointer] Unexpected type on the stack.
[ : System.Runtime.IOThreadScheduler+ScheduledOverlapped::Post][mdToken=0x6000183][offset 0x0000000D][found unmanaged pointer][expected unmanaged pointer] Unexpected type on the stack.
[ : System.Runtime.IOThreadScheduler+ScheduledOverlapped::Cleanup][mdToken=0x6000184][offset 0x00000019][found unmanaged pointer][expected unmanaged pointer] Unexpected type on the stack.
[ : System.Runtime.Diagnostics.DiagnosticsEventProvider::WriteMessageEvent][mdToken=0x6000357][offset 0x0000004B][found ref 'System.String'] Expected numeric type on the stack.
[ : System.Runtime.Diagnostics.DiagnosticsEventProvider::WriteEvent][mdToken=0x6000359][offset 0x0000012B] Instruction cannot be verified.
[ : System.Runtime.Diagnostics.DiagnosticsEventProvider::WriteEvent][mdToken=0x6000359][offset 0x0000003F] Instruction cannot be verified.
[ : System.Runtime.Diagnostics.DiagnosticsEventProvider::WriteEvent][mdToken=0x600035a][offset 0x00000061][found ref 'System.String'] Expected numeric type on the stack.
[ : System.Runtime.Diagnostics.DiagnosticsEventProvider::WriteEvent][mdToken=0x600035b][offset 0x0000001F][found unmanaged pointer][expected unmanaged pointer] Unexpected type on the stack.
[ : System.Runtime.Diagnostics.DiagnosticsEventProvider::WriteTransferEvent][mdToken=0x600035c][offset 0x0000007C] Instruction cannot be verified.
[ : System.Runtime.Diagnostics.DiagnosticsEventProvider::WriteTransferEvent][mdToken=0x600035c][offset 0x000002F4][found Native Int][expected unmanaged pointer] Unexpected type on the stack.
[ : System.Runtime.Diagn...
Posted
Updated 27-Nov-14 6:14am
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900