Hi,
I am attempting to load an assembly that has been stored in a table as a byte array. I have created a c# class called AssemblyLoader that takes in 2 parameters, the assembly name and the parameters for the assembly (just a query string).
From this it returns the assembly byte array using a simple sql statement within the class using the assembly name to select the assembly bytes to return from the database.
The returned byte array of the assembly is loaded using:
Assembly assembly = Assembly.Load(assemblyBytes);
Error:
Msg 6522, Level 16, State 1, Procedure ClientInterface, Line 0
A .NET Framework error occurred during execution of user defined routine or aggregate 'ClientInterface':
System.IO.FileLoadException: LoadFrom(), LoadFile(), Load(byte[]) and LoadModule() have been disabled by the host.
System.IO.FileLoadException:
at System.Reflection.Assembly.nLoadImage(Byte[] rawAssembly, Byte[] rawSymbolStore, Evidence evidence, StackCrawlMark& stackMark, Boolean fIntrospection)
at System.Reflection.Assembly.Load(Byte[] rawAssembly)
at Reflector.runQuery(String query, String parameter)
Thanks for your help.

Error 6522 Trying to Run Assembly from database
A. Rajesh
A SQL CLR Project is just a project type in VS, which makes it easier for the developer to create and deploy assemblies to SQL Server. Under the cover the SQL CLR Project is just calling CREATE ASSEMBLY ... etc, in order to deploy.
Niels
piyush mathur Infosys
Just to confirm, you are not limited to placing the output of SQL Server Project inside SQL Server 2005
Thank you,
Lubomir
WinFX_Girl
I am using Assembly.Load with the Full name of the assembly and it works fine.
Thanks
Fernando Azpeitia
public static string execute(string data)
and are compiled and added to the database. They are loaded depending on the query I pass in and they go off and get data from different interfaces ie, LDAP, HTTP SOAP etc... and return me a simple string.
N
Laurence Fass
Niels