SQL Server 2008 External Assemblies

0

I have an external assembly I'm trying to load in to SQL server 2008 and I keep getting the same error as this previous post.

SQL Server stops loading assembly

    Msg 10314, Level 16, State 11, Line 3
    An error occurred in the Microsoft .NET Framework while trying to load assembly id     65536. 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 'MY_ASSEMBLY, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The given assembly name or codebase was invalid. (Exception from HRESULT: 0x80131047)
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)

I've tried all the steps that are suggested and nothing works for me, any thoughts?

I am using a local server created on my machine, and I've tried it with backup restored databases, a fresh database created by me (default owner), and a fresh database with 'sa' as the owner. Thoughts would be appreciated :)

EDIT: ok, so that's the error message I get, here's what I've tried using

USE myDatabase
GO

EXEC sp_changedbowner 'sa'
ALTER DATABASE myDatabase SET TRUSTWORTHY ON 

alter authorization on database::myDatabase to sa;

I'm just trying to figure out why this is happening.

c#
sql-server-2008
asked on Stack Overflow Jun 30, 2014 by hoffmabo • edited May 23, 2017 by Community

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0