Cristiano Simionato
12-18-2007, 03:27 PM
After updating Spring.Net from 1.1 M1 to 1.1 Final Release, the first time the web service (.asmx page) is called, after an iisreset, IIS return a "Duplicate type name within an assembly" exception: the web service is correctly started, and a refresh of the browser show correctly the web method list.
Exception:
[ArgumentException: Nome tipo duplicato in un assembly.]
System.Reflection.Emit.AssemblyBuilderData.CheckTy peNameConflict(String strTypeName, TypeBuilder enclosingType) +2654633
System.Reflection.Emit.TypeBuilder.Init(String fullname, TypeAttributes attr, Type parent, Type[] interfaces, Module module, PackingSize iPackingSize, Int32 iTypeSize, TypeBuilder enclosingType) +171
System.Reflection.Emit.ModuleBuilder.DefineTypeNoL ock(String name, TypeAttributes attr, Type parent) +97
System.Reflection.Emit.ModuleBuilder.DefineType(St ring name, TypeAttributes attr, Type parent) +102
Spring.Proxy.DynamicProxyManager.CreateTypeBuilder (String typeName, Type baseType) +61
Spring.Web.Services.WebServiceProxyTypeBuilder.Cre ateTypeBuilder(String name, Type baseType) +11
Spring.Proxy.CompositionProxyTypeBuilder.BuildProx yType() +72
Spring.Web.Services.WebServiceExporter.GeneratePro xy() +226
Spring.Web.Services.WebServiceExporter.AfterProper tiesSet() +72
Spring.Objects.Factory.Support.AbstractAutowireCap ableObjectFactory.InvokeInitMethods(Object target, String name, IConfigurableObjectDefinition definition) +177
Spring.Objects.Factory.Support.AbstractAutowireCap ableObjectFactory.ConfigureObject(String name, RootObjectDefinition definition, IObjectWrapper wrapper) +512
Spring.Objects.Factory.Support.AbstractAutowireCap ableObjectFactory.CreateObject(String name, RootObjectDefinition definition, Object[] arguments, Boolean allowEagerCaching) +581
[ObjectCreationException: Error creating object with name 'DocumentHistoryExporter' defined in 'file [D:\OrangeSource\DocumentHistory\DocumentHistory.Se rvices\Webservices.config]' : Initialization of object failed : Nome tipo duplicato in un assembly.]
Spring.Objects.Factory.Support.AbstractAutowireCap ableObjectFactory.CreateObject(String name, RootObjectDefinition definition, Object[] arguments, Boolean allowEagerCaching) +732
Spring.Objects.Factory.Support.AbstractAutowireCap ableObjectFactory.CreateObject(String name, RootObjectDefinition definition, Object[] arguments) +17
Spring.Objects.Factory.Support.AbstractObjectFacto ry.CreateAndCacheSingletonInstance(String objectName, RootObjectDefinition objectDefinition, Object[] arguments) +157
Spring.Objects.Factory.Support.WebObjectFactory.Cr eateAndCacheSingletonInstance(String objectName, RootObjectDefinition objectDefinition, Object[] arguments) +89
Spring.Objects.Factory.Support.AbstractObjectFacto ry.GetObject(String name, Type requiredType, Object[] arguments) +475
Spring.Objects.Factory.Support.AbstractObjectFacto ry.GetObject(String name) +32
Spring.Objects.Factory.Support.DefaultListableObje ctFactory.PreInstantiateSingletons() +468
Spring.Context.Support.AbstractApplicationContext. Refresh() +529
Spring.Context.Support.WebApplicationContext..ctor (String name, Boolean caseSensitive, IApplicationContext parentContext, String[] configurationLocations) +54
Spring.Context.Support.WebApplicationContext..ctor (String name, Boolean caseSensitive, String[] configurationLocations) +17
[TargetInvocationException: Eccezione generata dalla destinazione di una chiamata.]
System.RuntimeMethodHandle._InvokeConstructor(Obje ct[] args, SignatureStruct& signature, IntPtr declaringType) +0
System.RuntimeMethodHandle.InvokeConstructor(Objec t[] args, SignatureStruct signature, RuntimeTypeHandle declaringType) +13
System.Reflection.RuntimeConstructorInfo.Invoke(Bi ndingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) +366
Spring.Util.ObjectUtils.InstantiateType(Constructo rInfo constructor, Object[] arguments) +157
[FatalReflectionException: Cannot instantiate Type [Spring.Context.Support.WebApplicationContext] using ctor [Void .ctor(System.String, Boolean, System.String[])] : 'Eccezione generata dalla destinazione di una chiamata.']
Spring.Util.ObjectUtils.InstantiateType(Constructo rInfo constructor, Object[] arguments) +324
Spring.Context.Support.RootContextInstantiator.Inv okeContextConstructor(ConstructorInfo ctor) +99
Spring.Context.Support.ContextInstantiator.Instant iateContext() +31
Spring.Context.Support.ContextHandler.InstantiateC ontext(IApplicationContext parentContext, Object configContext, String contextName, Type contextType, Boolean caseSensitive, String[] resources) +137
Spring.Context.Support.WebContextHandler.Instantia teContext(IApplicationContext parent, Object configContext, String contextName, Type contextType, Boolean caseSensitive, String[] resources) +305
Spring.Context.Support.ContextHandler.Create(Objec t parent, Object configContext, XmlNode section) +284
[ConfigurationErrorsException: Error creating context '/documenthistory.services': Nome tipo duplicato in un assembly.]
System.Configuration.BaseConfigurationRecord.Evalu ateOne(String[] keys, SectionInput input, Boolean isTrusted, FactoryRecord factoryRecord, SectionRecord sectionRecord, Object parentResult) +178
System.Configuration.BaseConfigurationRecord.Evalu ate(FactoryRecord factoryRecord, SectionRecord sectionRecord, Object parentResult, Boolean getLkg, Boolean getRuntimeObject, Object& result, Object& resultRuntimeObject) +896
System.Configuration.BaseConfigurationRecord.GetSe ctionRecursive(String configKey, Boolean getLkg, Boolean checkPermission, Boolean getRuntimeObject, Boolean requestIsHere, Object& result, Object& resultRuntimeObject) +1221
System.Configuration.BaseConfigurationRecord.GetSe ction(String configKey, Boolean getLkg, Boolean checkPermission) +56
System.Configuration.BaseConfigurationRecord.GetSe ction(String configKey) +8
System.Web.Configuration.HttpConfigurationSystem.S ystem.Configuration.Internal.IInternalConfigSystem .GetSection(String configKey) +65
System.Configuration.ConfigurationManager.GetSecti on(String sectionName) +107
Spring.Util.ConfigurationUtils.GetSection(String sectionName) +4
Spring.Context.Support.WebApplicationContext.GetCo ntextInternal(String virtualPath) +1088
Spring.Context.Support.WebApplicationContext.GetRo otContext() +75
Spring.Context.Support.WebSupportModule.Init(HttpA pplication app) +321
System.Web.HttpApplication.InitModulesCommon() +66
System.Web.HttpApplication.InitInternal(HttpContex t context, HttpApplicationState state, MethodInfo[] handlers) +814
System.Web.HttpApplicationFactory.GetNormalApplica tionInstance(HttpContext context) +243
System.Web.HttpApplicationFactory.GetApplicationIn stance(HttpContext context) +106
System.Web.HttpRuntime.ProcessRequestInternal(Http WorkerRequest wr) +340
Web.config:
<configuration>
<configSections>
<section name="nhibernate" type="System.Configuration.NameValueSectionHandler, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
<section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler, log4net"/>
<sectionGroup name="spring">
<section name="context" type="Spring.Context.Support.WebContextHandler, Spring.Web"/>
</sectionGroup>
</configSections>
<spring>
<context>
<resource uri="~/Webservices.config"/>
</context>
</spring>
<connectionStrings/>
<system.web>
<compilation debug="true">
<assemblies>
<add assembly="System.Transactions, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
<add assembly="System.Data.OracleClient, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/></assemblies>
</compilation>
<authentication mode="Windows"/>
<!--<httpHandlers>
<add verb="*" path="*.asmx" type="Spring.Web.Services.WebServiceHandlerFactory, Spring.Web"/>
</httpHandlers>-->
<httpModules>
<add name="Spring" type="Spring.Context.Support.WebSupportModule, Spring.Web"/>
</httpModules>
<webServices>
<conformanceWarnings>
<remove name="BasicProfile1_1"/>
</conformanceWarnings>
<protocols>
<add name="HttpGet"/>
<add name="HttpPost"/>
</protocols>
</webServices>
<httpRuntime maxRequestLength="524288"/>
</system.web>
<!-- NHibernate and Log4Net section [...] -->
</configuration>
webservice.config:
<object name="MyWebServices.asmx" type="MyNameSpace.WsMyWebServices, MyNameSpace" abstract="true"/>
<object id="WsMyWebServices" type="MyNameSpace.WsMyWebServices, MyNameSpace"/>
<object id="MyWebServicesExporter" type="Spring.Web.Services.WebServiceExporter, Spring.Web">
<property name="Namespace" value="http://www.myCompany.it/MyWebServices"/>
<property name="TargetName" value="WsMyWebServices"/>
</object>
Someone could help me, please?
Exception:
[ArgumentException: Nome tipo duplicato in un assembly.]
System.Reflection.Emit.AssemblyBuilderData.CheckTy peNameConflict(String strTypeName, TypeBuilder enclosingType) +2654633
System.Reflection.Emit.TypeBuilder.Init(String fullname, TypeAttributes attr, Type parent, Type[] interfaces, Module module, PackingSize iPackingSize, Int32 iTypeSize, TypeBuilder enclosingType) +171
System.Reflection.Emit.ModuleBuilder.DefineTypeNoL ock(String name, TypeAttributes attr, Type parent) +97
System.Reflection.Emit.ModuleBuilder.DefineType(St ring name, TypeAttributes attr, Type parent) +102
Spring.Proxy.DynamicProxyManager.CreateTypeBuilder (String typeName, Type baseType) +61
Spring.Web.Services.WebServiceProxyTypeBuilder.Cre ateTypeBuilder(String name, Type baseType) +11
Spring.Proxy.CompositionProxyTypeBuilder.BuildProx yType() +72
Spring.Web.Services.WebServiceExporter.GeneratePro xy() +226
Spring.Web.Services.WebServiceExporter.AfterProper tiesSet() +72
Spring.Objects.Factory.Support.AbstractAutowireCap ableObjectFactory.InvokeInitMethods(Object target, String name, IConfigurableObjectDefinition definition) +177
Spring.Objects.Factory.Support.AbstractAutowireCap ableObjectFactory.ConfigureObject(String name, RootObjectDefinition definition, IObjectWrapper wrapper) +512
Spring.Objects.Factory.Support.AbstractAutowireCap ableObjectFactory.CreateObject(String name, RootObjectDefinition definition, Object[] arguments, Boolean allowEagerCaching) +581
[ObjectCreationException: Error creating object with name 'DocumentHistoryExporter' defined in 'file [D:\OrangeSource\DocumentHistory\DocumentHistory.Se rvices\Webservices.config]' : Initialization of object failed : Nome tipo duplicato in un assembly.]
Spring.Objects.Factory.Support.AbstractAutowireCap ableObjectFactory.CreateObject(String name, RootObjectDefinition definition, Object[] arguments, Boolean allowEagerCaching) +732
Spring.Objects.Factory.Support.AbstractAutowireCap ableObjectFactory.CreateObject(String name, RootObjectDefinition definition, Object[] arguments) +17
Spring.Objects.Factory.Support.AbstractObjectFacto ry.CreateAndCacheSingletonInstance(String objectName, RootObjectDefinition objectDefinition, Object[] arguments) +157
Spring.Objects.Factory.Support.WebObjectFactory.Cr eateAndCacheSingletonInstance(String objectName, RootObjectDefinition objectDefinition, Object[] arguments) +89
Spring.Objects.Factory.Support.AbstractObjectFacto ry.GetObject(String name, Type requiredType, Object[] arguments) +475
Spring.Objects.Factory.Support.AbstractObjectFacto ry.GetObject(String name) +32
Spring.Objects.Factory.Support.DefaultListableObje ctFactory.PreInstantiateSingletons() +468
Spring.Context.Support.AbstractApplicationContext. Refresh() +529
Spring.Context.Support.WebApplicationContext..ctor (String name, Boolean caseSensitive, IApplicationContext parentContext, String[] configurationLocations) +54
Spring.Context.Support.WebApplicationContext..ctor (String name, Boolean caseSensitive, String[] configurationLocations) +17
[TargetInvocationException: Eccezione generata dalla destinazione di una chiamata.]
System.RuntimeMethodHandle._InvokeConstructor(Obje ct[] args, SignatureStruct& signature, IntPtr declaringType) +0
System.RuntimeMethodHandle.InvokeConstructor(Objec t[] args, SignatureStruct signature, RuntimeTypeHandle declaringType) +13
System.Reflection.RuntimeConstructorInfo.Invoke(Bi ndingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) +366
Spring.Util.ObjectUtils.InstantiateType(Constructo rInfo constructor, Object[] arguments) +157
[FatalReflectionException: Cannot instantiate Type [Spring.Context.Support.WebApplicationContext] using ctor [Void .ctor(System.String, Boolean, System.String[])] : 'Eccezione generata dalla destinazione di una chiamata.']
Spring.Util.ObjectUtils.InstantiateType(Constructo rInfo constructor, Object[] arguments) +324
Spring.Context.Support.RootContextInstantiator.Inv okeContextConstructor(ConstructorInfo ctor) +99
Spring.Context.Support.ContextInstantiator.Instant iateContext() +31
Spring.Context.Support.ContextHandler.InstantiateC ontext(IApplicationContext parentContext, Object configContext, String contextName, Type contextType, Boolean caseSensitive, String[] resources) +137
Spring.Context.Support.WebContextHandler.Instantia teContext(IApplicationContext parent, Object configContext, String contextName, Type contextType, Boolean caseSensitive, String[] resources) +305
Spring.Context.Support.ContextHandler.Create(Objec t parent, Object configContext, XmlNode section) +284
[ConfigurationErrorsException: Error creating context '/documenthistory.services': Nome tipo duplicato in un assembly.]
System.Configuration.BaseConfigurationRecord.Evalu ateOne(String[] keys, SectionInput input, Boolean isTrusted, FactoryRecord factoryRecord, SectionRecord sectionRecord, Object parentResult) +178
System.Configuration.BaseConfigurationRecord.Evalu ate(FactoryRecord factoryRecord, SectionRecord sectionRecord, Object parentResult, Boolean getLkg, Boolean getRuntimeObject, Object& result, Object& resultRuntimeObject) +896
System.Configuration.BaseConfigurationRecord.GetSe ctionRecursive(String configKey, Boolean getLkg, Boolean checkPermission, Boolean getRuntimeObject, Boolean requestIsHere, Object& result, Object& resultRuntimeObject) +1221
System.Configuration.BaseConfigurationRecord.GetSe ction(String configKey, Boolean getLkg, Boolean checkPermission) +56
System.Configuration.BaseConfigurationRecord.GetSe ction(String configKey) +8
System.Web.Configuration.HttpConfigurationSystem.S ystem.Configuration.Internal.IInternalConfigSystem .GetSection(String configKey) +65
System.Configuration.ConfigurationManager.GetSecti on(String sectionName) +107
Spring.Util.ConfigurationUtils.GetSection(String sectionName) +4
Spring.Context.Support.WebApplicationContext.GetCo ntextInternal(String virtualPath) +1088
Spring.Context.Support.WebApplicationContext.GetRo otContext() +75
Spring.Context.Support.WebSupportModule.Init(HttpA pplication app) +321
System.Web.HttpApplication.InitModulesCommon() +66
System.Web.HttpApplication.InitInternal(HttpContex t context, HttpApplicationState state, MethodInfo[] handlers) +814
System.Web.HttpApplicationFactory.GetNormalApplica tionInstance(HttpContext context) +243
System.Web.HttpApplicationFactory.GetApplicationIn stance(HttpContext context) +106
System.Web.HttpRuntime.ProcessRequestInternal(Http WorkerRequest wr) +340
Web.config:
<configuration>
<configSections>
<section name="nhibernate" type="System.Configuration.NameValueSectionHandler, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
<section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler, log4net"/>
<sectionGroup name="spring">
<section name="context" type="Spring.Context.Support.WebContextHandler, Spring.Web"/>
</sectionGroup>
</configSections>
<spring>
<context>
<resource uri="~/Webservices.config"/>
</context>
</spring>
<connectionStrings/>
<system.web>
<compilation debug="true">
<assemblies>
<add assembly="System.Transactions, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
<add assembly="System.Data.OracleClient, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/></assemblies>
</compilation>
<authentication mode="Windows"/>
<!--<httpHandlers>
<add verb="*" path="*.asmx" type="Spring.Web.Services.WebServiceHandlerFactory, Spring.Web"/>
</httpHandlers>-->
<httpModules>
<add name="Spring" type="Spring.Context.Support.WebSupportModule, Spring.Web"/>
</httpModules>
<webServices>
<conformanceWarnings>
<remove name="BasicProfile1_1"/>
</conformanceWarnings>
<protocols>
<add name="HttpGet"/>
<add name="HttpPost"/>
</protocols>
</webServices>
<httpRuntime maxRequestLength="524288"/>
</system.web>
<!-- NHibernate and Log4Net section [...] -->
</configuration>
webservice.config:
<object name="MyWebServices.asmx" type="MyNameSpace.WsMyWebServices, MyNameSpace" abstract="true"/>
<object id="WsMyWebServices" type="MyNameSpace.WsMyWebServices, MyNameSpace"/>
<object id="MyWebServicesExporter" type="Spring.Web.Services.WebServiceExporter, Spring.Web">
<property name="Namespace" value="http://www.myCompany.it/MyWebServices"/>
<property name="TargetName" value="WsMyWebServices"/>
</object>
Someone could help me, please?