Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
Log in  ::  Register  ::  Not logged in
Home       Members    Calendar    Who's On

Add to briefcase ««12

How to implement SHA-2 in SQL Server 2005 or 2008 with a CLR assembly Expand / Collapse
Posted Thursday, October 17, 2013 2:26 PM



Group: General Forum Members
Last Login: Monday, June 29, 2015 9:50 AM
Points: 139, Visits: 989
When we deployed the assembly to our 64-bit server, we got the following error message when trying to use the hashing function:

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

We resolved the issue by recompiling the assembly on a 64-bit workstation with the x64 CPU option, since the original assembly had been compiled on a 32-bit workstation.
Post #1505903
« Prev Topic | Next Topic »

Add to briefcase ««12

Permissions Expand / Collapse