ALTER DATABASE scribe_devtest SET TRUSTWORTHY on
GO
CREATE ASSEMBLY Messaging
AUTHORIZATION [mylogin]
FROM 'C:\Windows\Microsoft.NET\Framework64\v4.0.30319\System.Messaging.dll'
WITH PERMISSION_SET = UNSAFE
GO
CREATE ASSEMBLY SqlMSMQ
AUTHORIZATION [mylogin]
FROM 'C:\Windows\Microsoft.NET\Framework64\v4.0.30319\SqlMSMQ.dll'
WITH PERMISSION_SET = UNSAFE
GO
CREATE PROCEDURE testdllproc
@queue nvarchar(200),
@msg nvarchar(MAX)
AS EXTERNAL NAME SqlMSMQ.[SqlMSMQ.SqlMSMQ].SendMessage
GO
Problem:
on
exec testdllproc '.\private$\test','<abcde>'
Error is:
An error occurred in the Microsoft .NET Framework while trying to load assembly id 65581. The server may be running out of resources, or the assembly may not be trusted with PERMISSION_SET = EXTERNAL_ACCESS or UNSAFE. Run the query again, or check documentation to see how to solve the assembly trust issues. For more information about this error:
System.IO.FileLoadException: Could not load file or assembly 'sqlmsmq, Version=1.0.0.0, Culture=neutral, PublicKeyToken=0c63af21be52a322' or one of its dependencies. Assembly in host store has a different signature than assembly in GAC. (Exception from HRESULT: 0x80131050) See Microsoft Knowledge Base article 949080 for more information.
System.IO.FileLoadException:
at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
at System.Reflection.RuntimeAssembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean forIntrospection)
at System.Reflection.RuntimeAssembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection)
at System.Reflection.Assembly.Load(String assemblyString)
This seems to b a permission issue although mylogin is dbowner.
Also i have looged in to SQL with windows autentication. Is that an issue?