April 15, 2014 at 1:20 pm
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.
April 15, 2014 at 1:43 pm
Check This : http://support.microsoft.com/kb/913668
and
is the permission set to create assembly same in UAT and Production?
You may refer this also for permission set http://msdn.microsoft.com/en-us/library/ms189524.aspx%5B/url%5D
April 15, 2014 at 1:56 pm
Hi,
I had checked the same kb article and created xmlserializer.dll too. Tested in DEV & UAT , it was working agiain, not working in production
April 15, 2014 at 1:58 pm
Moreover, i am not getting any error while executing assembly. When i calling SQL function which consumes this assembly, i got the above specific error
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply