I got another kind of error while editing languages at system level: after saving a resource via browser the DNN host brutally failed with an error about a duplicate resource.
This is a 5.5.0 professional host with en-US disabled, it-IT as primary language and en-GB as secondary. Since under en-GB many resources were missing, I was just opening en-US resources and saving as en-GB. Did so on some global and local resources, until I got this bad error after saving DesktopModules\Admin\Messaging\App_LocalResources\viewmessage.ascx.resx.
I then deleted the en-GB localized file and restarted IIS, and host came back online. But I actually cannot see duplicates in this resx. Maybe the error was due to another resource (I saved some before this), but since host came back online after a restart, without deleting or modyfying other resx files, I'm a bit confused: did anybody ever encounter such a problem?
AssemblyVersion: 5.5.0
PortalID: -1
PortalName:
UserID: -1
UserName:
ActiveTabID: -1
ActiveTabName:
RawURL: /Default.aspx
AbsoluteURL: /Default.aspx
AbsoluteURLReferrer:
UserAgent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.04506.30; .NET CLR 3.0.04506.648; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729)
DefaultDataProvider: DotNetNuke.Data.SqlDataProvider, DotNetNuke.SqlDataProvider
ExceptionGUID: d256265e-55ec-46c2-9dd9-81624bed279a
InnerException: Unhandled Error:
FileName:
FileLineNumber: 0
FileColumnNumber: 0
Method: System.ThrowHelper.ThrowArgumentException
StackTrace:
Message: System.Exception: Unhandled Error: ---> System.TypeInitializationException: The type initializer for 'DotNetNuke.Entities.Users.UserController' threw an exception. ---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.ArgumentException: An item with the same key has already been added. at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource) at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add) at System.Collections.ObjectModel.KeyedCollection`2.AddKey(TKey key, TItem item) at System.Collections.ObjectModel.KeyedCollection`2.InsertItem(Int32 index, TItem item) at System.Collections.ObjectModel.Collection`1.Add(T item) at DotNetNuke.ComponentModel.SimpleContainer.AddBuilder(Type contractType, IComponentBuilder builder) at DotNetNuke.ComponentModel.SimpleContainer.RegisterComponentInstance(String name, Type contractType, Object instance) at DotNetNuke.ComponentModel.AbstractContainer.RegisterComponentInstance[TContract](Object instance) at DotNetNuke.ComponentModel.ComponentFactory.RegisterComponentInstance[TContract](Object instance) at DotNetNuke.Security.Membership.AspNetMembershipProvider..ctor() --- End of inner exception stack trace --- at System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandle& ctor, Boolean& bNeedSecurityCheck) at System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean fillCache) at System.RuntimeType.CreateInstanceImpl(Boolean publicOnly, Boolean skipVisibilityChecks, Boolean fillCache) at System.Activator.CreateInstance(Type type, Boolean nonPublic) at System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes) at System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes) at System.RuntimeType.InvokeMember(String name, BindingFlags bindingFlags, Binder binder, Object target, Object[] providedArgs, ParameterModifier[] modifiers, CultureInfo culture, String[] namedParams) at System.Type.InvokeMember(String name, BindingFlags invokeAttr, Binder binder, Object target, Object[] args, CultureInfo culture) at DotNetNuke.Framework.Reflection.CreateInstance(Type Type) at DotNetNuke.ComponentModel.SingletonComponentBuilder.CreateInstance() at DotNetNuke.ComponentModel.SingletonComponentBuilder.BuildComponent() at DotNetNuke.ComponentModel.SimpleContainer.GetComponent(IComponentBuilder builder) at DotNetNuke.ComponentModel.SimpleContainer.GetComponent(Type contractType) at DotNetNuke.ComponentModel.AbstractContainer.GetComponent[TContract]() at DotNetNuke.ComponentModel.ComponentFactory.GetComponent[TContract]() at DotNetNuke.Security.Membership.MembershipProvider.Instance() at DotNetNuke.Entities.Users.UserController..cctor() --- End of inner exception stack trace --- at DotNetNuke.Entities.Users.UserController.GetUserCountByPortal(Int32 portalId) at DotNetNuke.Entities.Portals.PortalInfo.Fill(IDataReader dr) at DotNetNuke.Common.Utilities.CBO.FillObjectFromReader(Object objObject, IDataReader dr) at DotNetNuke.Common.Utilities.CBO.CreateObjectFromReader(Type objType, IDataReader dr, Boolean closeReader) at DotNetNuke.Common.Utilities.CBO.FillListFromReader(Type objType, IDataReader dr, IList objList, Boolean closeReader) at DotNetNuke.Common.Utilities.CBO.FillCollection(IDataReader dr, Type objType) at DotNetNuke.Entities.Portals.PortalController.GetPortals() at DotNetNuke.Common.Initialize.CacheMappedDirectory() at DotNetNuke.Common.Initialize.InitializeApp(HttpApplication app) at DotNetNuke.Common.Initialize.Init(HttpApplication app) at DotNetNuke.Common.Global.Global_BeginRequest(Object sender, EventArgs e) at System.Web.HttpApplication.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) --- End of inner exception stack trace ---
Source: