I am making a deployment of some services WCF
, when consuming the services; in a server it works correctly, but in another server in which it must be deployed, it is throwing me the following error:
The type initializer for 'Compensar.CyA.Mapper.Entidades.Servicio.ClienteEmpresaExtend' threw an exception. at Compensar.CyA.Servicios.Implementacion.ClienteEmpresa.<>c__DisplayClass14.<CrearSucursal>b__13() at Compensar.CyA.Servicios.Implementacion.LanzadorOperaciones.Ejecutar[TEntity](headerMessage header, Func'1 action)
I have reviewed the two servers, to find the differences of configuration but I still do not give with the joke.
I found the detail of the error
Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information. at System.Reflection.RuntimeModule.GetTypes(RuntimeModule module) at System.Reflection.RuntimeModule.GetTypes() at System.Reflection.Assembly.GetTypes() at System.Data.Metadata.Edm.ObjectItemConventionAssemblyLoader.LoadTypesFromAssembly() at System.Data.Metadata.Edm.ObjectItemAssemblyLoader.Load() at System.Data.Metadata.Edm.AssemblyCache.LoadAssembly(Assembly assembly, Boolean loadReferencedAssemblies, ObjectItemLoadingSessionData loadingData) at System.Data.Metadata.Edm.AssemblyCache.LoadAssembly(Assembly assembly, Boolean loadReferencedAssemblies, KnownAssembliesSet knownAssemblies, EdmItemCollection edmItemCollection, Action'1 logLoadMessage, Object& loaderCookie, Dictionary'2& typesInLoading, List'1& errors) at System.Data.Metadata.Edm.ObjectItemCollection.LoadAssemblyFromCache(ObjectItemCollection objectItemCollection, Assembly assembly, Boolean loadReferencedAssemblies, EdmItemCollection edmItemCollection, Action'1 logLoadMessage) at System.Data.Metadata.Edm.ObjectItemCollection.ImplicitLoadAssemblyForType(Type type, EdmItemCollection edmItemCollection) at System.Data.Metadata.Edm.MetadataWorkspace.ImplicitLoadAssemblyForType(Type type, Assembly callingAssembly) at System.Data.Objects.ObjectContext.GetTypeUsage(Type entityCLRType) at System.Data.Objects.ObjectContext.GetEntitySetFromContainer(EntityContainer container, Type entityCLRType, String exceptionParameterName) at System.Data.Objects.ObjectContext.GetEntitySetForType(Type entityCLRType, String exceptionParameterName) at System.Data.Objects.ObjectContext.CreateObjectSet[TEntity]() at Intergrupo.Data.Repository.EntityFramework.DataRepository'1.get_ObjectSet() at Intergrupo.Data.Repository.EntityFramework.DataRepository'1.GetFirst(Func'2 filtro) at Compensar.CyA.Dominio.GestionarCliente.Consultar(TipoCliente tipoCliente, ICollection'1 opcionesConsulta, Int32 tipoIdentificacion, String numeroIdentificacion, Decimal idSucursal, Decimal idCentroCosto) at Compensar.CyA.Servicios.Implementacion.ClienteEmpresa.<>c__DisplayClassa.<Consultar>b__7() at Compensar.CyA.Servicios.Implementacion.LanzadorOperaciones.Ejecutar[TEntity](headerMessage header, Func'1 action)
But I still do not understand why one server works and the other does not.
I appreciate any help.