Recently I created an assembly in .net and hooked it up to my sql server. Everything worked fine and I had no problems until I moved it to a production machine. At this point I've tried just about everything to get it working. I've googled this error to death and I'm still not having any luck. I can create the assembly and I can create stored procedures from it, but when I try to execute the stored procedure I get the following error.Msg 10314, Level 16, State 11, Line 2An error occurred in the Microsoft .NET Framework while trying to load assembly id 65544. 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 'santasclr, 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)
I've tried all kinds of things including the following. alter database Santa set trustworthy on EXEC dbo.sp_changedbowner @loginame = N'sa', @map = falsesp_configure 'clr enabled',1goreconfigure with overridegoalter ASSEMBLY SantasCLR FROM 'C:\Program Files (x86)\SantasCLR\SantasCLR.dll' WITH PERMISSION_SET = UNSAFE goCREATE PROCEDURE [dbo].[WorkerGetDay] @UserName [nvarchar](max), @Password [nvarchar](max), @URL [nvarchar](max), @ConnectionType [nvarchar](max), @Day as Datetime, @Err [nvarchar](max) outputWITH EXECUTE AS CALLERASEXTERNAL NAME [SantasCLR].[Worker].GetDay
I have even given every sql account full control over the folder with the dll in it. I've compiled 64 bit dlls and 32 bit dlls, but that doesn't work either. any help would be appreciated.