Server Error in '/' Application.

Duplicate type name within an assembly.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.ArgumentException: Duplicate type name within an assembly.

Source Error:

The source code that generated this unhandled exception can only be shown when compiled in debug mode. To enable this, please follow one of the below steps, then request the URL:

1. Add a "Debug=true" directive at the top of the file that generated the error. Example:

  <%@ Page Language="C#" Debug="true" %>

or:

2) Add the following section to the configuration file of your application:

<configuration>
   <system.web>
       <compilation debug="true"/>
   </system.web>
</configuration>

Note that this second technique will cause all files within a given application to be compiled in debug mode. The first technique will cause only that particular file to be compiled in debug mode.

Important: Running applications in debug mode does incur a memory/performance overhead. You should make sure that an application has debugging disabled before deploying into production scenario.

Stack Trace:


[ArgumentException: Duplicate type name within an assembly.]
   System.Reflection.Emit.ModuleBuilder.CheckTypeNameConflict(String strTypeName, Type enclosingType) +14989885
   System.Reflection.Emit.AssemblyBuilderData.CheckTypeNameConflict(String strTypeName, TypeBuilder enclosingType) +63
   System.Reflection.Emit.TypeBuilder.Init(String fullname, TypeAttributes attr, Type parent, Type[] interfaces, ModuleBuilder module, PackingSize iPackingSize, Int32 iTypeSize, TypeBuilder enclosingType) +162
   System.Reflection.Emit.ModuleBuilder.DefineType(String name, TypeAttributes attr, Type parent, Type[] interfaces) +163
   Castle.DynamicProxy.Builder.CodeBuilder.EasyType..ctor(ModuleScope modulescope, String name, Type baseType, Type[] interfaces, Boolean serializable) +198
   Castle.DynamicProxy.Builder.CodeGenerators.BaseCodeGenerator.CreateTypeBuilder(String typeName, Type baseType, Type[] interfaces) +157
   Castle.DynamicProxy.Builder.CodeGenerators.ClassProxyGenerator.GenerateCode(Type baseClass, Type[] interfaces) +492
   Castle.DynamicProxy.Builder.DefaultProxyBuilder.CreateClassProxy(Type theClass, Type[] interfaces) +128
   Castle.DynamicProxy.ProxyGenerator.CreateClassProxy(Type baseClass, Type[] interfaces, IInterceptor interceptor, Boolean checkAbstract, Object[] argumentsForConstructor) +179
   NHibernate.Proxy.CastleProxyFactory.GetProxy(Object id, ISessionImplementor session) +195

[HibernateException: Creating a proxy instance failed]
   NHibernate.Proxy.CastleProxyFactory.GetProxy(Object id, ISessionImplementor session) +466
   NHibernate.Persister.Entity.AbstractEntityPersister.CreateProxy(Object id, ISessionImplementor session) +23
   NHibernate.Impl.SessionImpl.DoLoadByClass(Type clazz, Object id, Boolean checkDeleted, Boolean allowProxyCreation) +539
   NHibernate.Impl.SessionImpl.InternalLoad(Type clazz, Object id, Boolean eager, Boolean isNullable) +59
   NHibernate.Type.EntityType.ResolveIdentifier(Object id, ISessionImplementor session) +67
   NHibernate.Type.EntityType.ResolveIdentifier(Object id, ISessionImplementor session, Object owner) +51
   NHibernate.Impl.SessionImpl.InitializeEntity(Object obj) +287
   NHibernate.Loader.Loader.InitializeEntitiesAndCollections(IList hydratedObjects, Object resultSetId, ISessionImplementor session) +405
   NHibernate.Loader.Loader.DoQuery(ISessionImplementor session, QueryParameters queryParameters, Boolean returnProxies) +1070
   NHibernate.Loader.Loader.DoQueryAndInitializeNonLazyCollections(ISessionImplementor session, QueryParameters queryParameters, Boolean returnProxies) +75
   NHibernate.Loader.Loader.DoList(ISessionImplementor session, QueryParameters queryParameters) +86
   NHibernate.Loader.Loader.ListIgnoreQueryCache(ISessionImplementor session, QueryParameters queryParameters) +23
   NHibernate.Loader.Loader.List(ISessionImplementor session, QueryParameters queryParameters, ISet querySpaces, IType[] resultTypes) +117
   NHibernate.Loader.Criteria.CriteriaLoader.List(ISessionImplementor session) +56
   NHibernate.Impl.SessionImpl.Find(CriteriaImpl criteria, IList results) +457
   NHibernate.Impl.SessionImpl.Find(CriteriaImpl criteria) +67
   NHibernate.Impl.CriteriaImpl.List() +33
   NHibernate.Impl.CriteriaImpl.UniqueResult() +9
   NHibernate.Impl.CriteriaImpl.UniqueResult() +18
   FineSpun.MenuItem.GetItem(Int32 ItemId, MenuItemStatusEnum ItemStatus) +148
   FineSpun.Index.get_HuidigItem() +96
   FineSpun.Index.Page_PreInit(Object sender, EventArgs e) +627
   System.Web.UI.Page.OnPreInit(EventArgs e) +11860612
   System.Web.UI.Page.PerformPreInit() +46
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1110


Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.7.4087.0