SQL CLR Deployment Issue

  • Hi,

    I have created SQL Datbase project for CLR function and this project refers one class project which in turn refers webservice.

    I had deployed this CLR and it was working fine in dev/UAT environment. When i moved into production. I got the following error

    A .NET Framework error occurred during execution of user-defined routine or aggregate "GetSalary":

    System.InvalidOperationException: Cannot load dynamically generated serialization assembly. In some hosting environments assembly load functionality is restricted, consider using pre-generated serializer. Please see inner exception for more information. ---> System.IO.FileLoadException: LoadFrom(), LoadFile(), Load(byte[]) and LoadModule() have been disabled by the host.

    System.IO.FileLoadException:

    at System.Reflection.RuntimeAssembly.nLoadImage(Byte[] rawAssembly, Byte[] rawSymbolStore, Evidence evidence, StackCrawlMark& stackMark, Boolean fIntrospection, SecurityContextSource securityContextSource)

    at System.Reflection.Assembly.Load(Byte[] rawAssembly, Byte[] rawSymbolStore, Evidence securityEvidence)

    at Microsoft.CSharp.CSharpCodeGenerator.FromFileBatch(CompilerParameters options, String[] fileNames)

    at Microsoft.CSharp.CSharpCodeGenerator.FromSourceBatch(CompilerPar

    ...

    System.InvalidOperationException:

    at System.Xml.Serialization.Compiler.Compile(Assembly parent, String ns, XmlSerializerCompilerParameters xmlParameters, Evidence evidence)

    at System.Xml.Serialization.TempAssembly.GenerateAssembly(XmlMapping[] xmlMappings, Type[] types, String defaultNamespace, Evidence evidence, XmlSerializerCompilerParameters parameters, Assembly assembly, Hashtable assemblies)

    at System.Xml.Serialization.TempAssembly..ctor(XmlMapping[] xmlMappings, Type[] types, String defaultNamespace, String location, Evidence evidence)

    at System.Xml.Serialization.XmlSerializer.GetSerializersFromCache(XmlMapping[] mappings, Type type)

    at System.Xml.Serialization.XmlSerializer.FromMappings(XmlMapping[] mappings, Type type)

    at System.Web.Services.Protocols.SoapClientType..ctor(Type type)

    at System.Web.Services.Protocols.SoapHttpClientProtocol..ctor()

    at CL_ICPSalary.wsICPsalary.Service1..ctor()

    at CL_ICPSalary.clsICPSalary.GetSalary_Data(String key, String eDate)

    I had also checked Sys_Clr properties, CLR is pointing to .net 4.0. The entire server setup is similar to DEv/UAT. The only difference in production is that its a cluster.

    Can any one have any idea on this? I would really appreciate your help.

Viewing 0 posts

You must be logged in to reply to this topic. Login to reply