0

I keep getting the following error:

Msg 10314, Level 16, State 11, Line 1
An error occurred in the Microsoft .NET Framework while trying to load assembly id 66079. 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 'ncestablegenerator, 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.Assembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection)
   at System.Reflection.Assembly.InternalLoad(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection)
   at System.Reflection.Assembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection)
   at System.Reflection.Assembly.Load(String assemblyString)

This is the creation of my assembly:

CREATE ASSEMBLY [NCESTableGenerator]
AUTHORIZATION [dbo]
from 'C:\SqlDlls\NCESTableGenerator.dll'
WITH PERMISSION_SET = UNSAFE
GO

Any ideas? There is plenty of space on the server.

2
  • 3
    Could it be that the SQL Server service account does not have permissions to see/access C:\SqlDlls? Did you try placing the DLL in the binn folder for the instance instead? Sep 11, 2012 at 19:08
  • nevermind I had some build properties set to x86 instead of any cpu.
    – cdub
    Sep 11, 2012 at 20:04

1 Answer 1

0

You need to set database trustworthy ON before you run that statement .

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.