Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeGetting StartedGetting StartedInstalling DNN ...Installing DNN ...An item with the same key has already been added. How to solve it?An item with the same key has already been added. How to solve it?
Previous
 
Next
New Post
3/14/2011 4:27 AM
 

the website got the error,how to solve it! thx

Server Error in '/gxxhsd' Application.
--------------------------------------------------------------------------------

An item with the same key has already been added.
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: An item with the same key has already been added.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. 

Stack Trace:

[ArgumentException: An item with the same key has already been added.]
   System.ThrowHelper.ThrowArgumentException(ExceptionResource resource) +51
   System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add) +7464300
   System.Collections.ObjectModel.KeyedCollection`2.AddKey(TKey key, TItem item) +93
   System.Collections.ObjectModel.KeyedCollection`2.InsertItem(Int32 index, TItem item) +38
   System.Collections.ObjectModel.Collection`1.Add(T item) +117
   DotNetNuke.ComponentModel.SimpleContainer.AddBuilder(Type contractType, IComponentBuilder builder) +111
   DotNetNuke.ComponentModel.SimpleContainer.RegisterComponentInstance(String name, Type contractType, Object instance) +121
   DotNetNuke.ComponentModel.AbstractContainer.RegisterComponentInstance(Object instance) +82
   DotNetNuke.ComponentModel.ComponentFactory.RegisterComponentInstance(Object instance) +77
   DotNetNuke.Security.Membership.AspNetMembershipProvider..ctor() +193

[TargetInvocationException: Exception has been thrown by the target of an invocation.]
   System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandle& ctor, Boolean& bNeedSecurityCheck) +0
   System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean fillCache) +86
   System.RuntimeType.CreateInstanceImpl(Boolean publicOnly, Boolean skipVisibilityChecks, Boolean fillCache) +230
   System.Activator.CreateInstance(Type type, Boolean nonPublic) +67
   System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes) +1051
   System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes) +111
   System.RuntimeType.InvokeMember(String name, BindingFlags bindingFlags, Binder binder, Object target, Object[] providedArgs, ParameterModifier[] modifiers, CultureInfo culture, String[] namedParams) +7651135
   System.Type.InvokeMember(String name, BindingFlags invokeAttr, Binder binder, Object target, Object[] args, CultureInfo culture) +36
   DotNetNuke.Framework.Reflection.CreateInstance(Type Type) +27
   DotNetNuke.ComponentModel.SingletonComponentBuilder.CreateInstance() +14
   DotNetNuke.ComponentModel.SingletonComponentBuilder.BuildComponent() +16
   DotNetNuke.ComponentModel.SimpleContainer.GetComponent(IComponentBuilder builder) +18
   DotNetNuke.ComponentModel.SimpleContainer.GetComponent(Type contractType) +81
   DotNetNuke.ComponentModel.AbstractContainer.GetComponent() +55
   DotNetNuke.ComponentModel.ComponentFactory.GetComponent() +63
   DotNetNuke.Security.Membership.MembershipProvider.Instance() +9
   DotNetNuke.Entities.Users.UserController..cctor() +6

[TypeInitializationException: The type initializer for 'DotNetNuke.Entities.Users.UserController' threw an exception.]
   DotNetNuke.Entities.Users.UserController.GetCurrentUserInfo() +0
   DotNetNuke.Services.Exceptions.BasePortalException.InitializePrivateVariables() +278



--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.50727.3615; ASP.NET Version:2.0.50727.3618

 
New Post
3/14/2011 9:26 AM
 
It appears that the error originated in the User Controller but without more information I have no idea its cause.

What version of DotNetNuke is installed?

Did you recently upgrade DotNetNuke versions? If so, from what version?

What were you doing on the site when the error occurred?

Try restarting the application:

1. Make a minor change to the site's web.config file - for example add a space at the end.
2. Resave the web.config file and if your site is hosted on a remote server, re-upload the modified web.config file to the site's root folder.
3. Browse to the site to see if the error has cleared.
4. If you can login as host (preferably) or admin user, open the Admin --> Event Viewer page and look for the same or a related error. You are welcome to then paste the complete error from the Event Viewer to this thread so we can take a closer look at it.

Bill, WESNet Designs
Team Lead - DotNetNuke Gallery Module Project (Not Actively Being Developed)
Extensions Forge Projects . . .
Current: UserExport, ContentDeJour, ePrayer, DNN NewsTicker, By Invitation
Coming Soon: FRBO-For Rent By Owner
 
New Post
3/14/2011 9:21 PM
 
hi!
DotNetNuke Version:05.04.04 (2)
i did not upgrade DotNetNuke recently.
sometime,suddently occur the error,sometime,use a news editor module,when click the  save button to save the article,occur the error.
everytime when the website occur the error,i restart the application pool,and then restart the iis, the error will be cleared,the website will run regularly.
2011-3-14 11:05:38   Scheduler Exception       AssemblyVersion: 5.4.4; PortalID: -1; PortalName ...
AssemblyVersion: 5.4.4
PortalID: -1
PortalName:
UserID: -1
UserName:
ActiveTabID: -1
ActiveTabName:
RawURL:
AbsoluteURL:
AbsoluteURLReferrer:
UserAgent:
DefaultDataProvider: DotNetNuke.Data.SqlDataProvider, DotNetNuke.SqlDataProvider
ExceptionGUID: 0ef44b56-4f60-45c2-9bc6-a5f5d1414367
InnerException: value can not be empty.parameter name: format
FileName:
FileLineNumber: 0
FileColumnNumber: 0
Method: System.String.Format
StackTrace:
Message: System.ArgumentNullException: value can not be empty.parameter name: format in System.String.Format(IFormatProvider provider, String format, Object[] args) in System.String.Format(String format, Object[] args) in DotNetNuke.Modules.Reports.Exceptions.ReportsModuleException.get_Message() 在 System.Exception.ToString() in DotNetNuke.Services.Log.EventLog.ExceptionLogController.AddLog(Exception objException, ExceptionLogType LogType) in DotNetNuke.Services.Exceptions.Exceptions.LogException(Exception exc) in DotNetNuke.Services.Search.ModuleIndexer.GetSearchIndexItems(Int32 PortalID) in DotNetNuke.Services.Search.SearchEngine.GetContent(IndexingProvider Indexer) in DotNetNuke.Services.Search.SearchEngine.IndexContent() 在 DotNetNuke.Services.Search.SearchEngineScheduler.DoWork()
Source:
Server Name: WEBSERVER

2011-3-14 11:05:38   Scheduler Event Failure       THREAD ID: 1; TYPE: DotNetNuke.Services.Search.SearchEng ...
THREAD ID: 1
TYPE: DotNetNuke.Services.Search.SearchEngineScheduler
EXCEPTION: value can not be empty.parameter name: format
RESCHEDULED FOR: 2011-3-14 12:05:07
SOURCE: STARTED_FROM_BEGIN_REQUEST
ACTIVE THREADS: 0
FREE THREADS: 1
READER TIMEOUTS: 0
WRITER TIMEOUTS: 0
IN PROGRESS: 0
IN QUEUE: 5
Server Name: WEBSERVER

thanks for your help :-)
 
Previous
 
Next
HomeHomeGetting StartedGetting StartedInstalling DNN ...Installing DNN ...An item with the same key has already been added. How to solve it?An item with the same key has already been added. How to solve it?


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out