Agent Desktop Error: An item with the same key has already been added

Jul 2, 2012 at 9:19 AM

Hi All,

I get 2 error messages when I start the Desktop Agent.
I've read that I can ignore the first error message.
What must I do To correct the 2nd error message?

 

02.07.2012 11:02:53: CCA: Agentdesktop starting...
02.07.2012 11:02:53: CCA: Unable to load DLL 'windowsaccessbridge.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E)
02.07.2012 11:02:58: CCA: DESKTOP_ERR_FATAL_ERROR:A possibly fatal error has occurred.  The application may now exit.
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.Linq.Enumerable.ToDictionary[TSource,TKey,TElement](IEnumerable`1 source, Func`2 keySelector, Func`2 elementSelector, IEqualityComparer`1 comparer)
   at System.Linq.Enumerable.ToDictionary[TSource,TKey](IEnumerable`1 source, Func`2 keySelector)
   at Microsoft.Uii.CrmEntityManager.OptionEntityManager.GetOptions(OrganizationServiceProxy organizationServiceProxy)
   at Microsoft.Uii.AifServices.OptionsService.GetOptions()
   at Microsoft.Uii.AifServices.OptionsService.GetOptionSetting(String itemName)
   at Microsoft.Uii.Common.ConfigurationValueReader.ReadAppSettings(String key)
   at Microsoft.Uii.Desktop.UI.Core.DesktopLoader.SetAuditFlag(String auditFlagName)
   at Microsoft.Uii.Desktop.UI.Core.DesktopLoader.GetOptions()
   at Microsoft.Uii.Desktop.UI.Core.DesktopLoader.DoLoginStep(LoginSteps loginSteps)
   at Microsoft.Uii.Desktop.UI.Core.DesktopLoader.LoadDesktop()
   at Microsoft.Uii.Desktop.UI.Core.DesktopBase.StartDesktopLoad()
   at Microsoft.Uii.Desktop.UI.Wpf.WpfDesktop.WpfRootDesktopForm_Loaded(Object sender, RoutedEventArgs e)
   at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
   at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
   at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
   at System.Windows.UIElement.RaiseEvent(RoutedEventArgs e)
   at System.Windows.BroadcastEventHelper.BroadcastEvent(DependencyObject root, RoutedEvent routedEvent)
   at System.Windows.BroadcastEventHelper.BroadcastLoadedEvent(Object root)
   at MS.Internal.LoadedOrUnloadedOperation.DoWork()
   at System.Windows.Media.MediaContext.FireLoadedPendingCallbacks()
   at System.Windows.Media.MediaContext.FireInvokeOnRenderCallbacks()
   at System.Windows.Media.MediaContext.RenderMessageHandlerCore(Object resizedCompositionTarget)
   at System.Windows.Media.MediaContext.RenderMessageHandler(Object resizedCompositionTarget)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)
   at System.Windows.Threading.DispatcherOperation.InvokeImpl()
   at System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext(Object state)
   at System.Threading.ExecutionContext.runTryCode(Object userData)
   at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Windows.Threading.DispatcherOperation.Invoke()
   at System.Windows.Threading.Dispatcher.ProcessQueue()
   at System.Windows.Threading.Dispatcher.WndProcHook(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)
   at System.Windows.Threading.Dispatcher.InvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
   at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
   at MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg)
   at System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)
   at System.Windows.Threading.Dispatcher.PushFrame(DispatcherFrame frame)
   at System.Windows.Application.RunDispatcher(Object ignore)
   at System.Windows.Application.RunInternal(Window window)
   at System.Windows.Application.Run(Window window)
   at Microsoft.Practices.CompositeUI.Windows.WindowShellApplication`2.Start()
   at Microsoft.Practices.CompositeUI.CabApplication`1.Run()
   at Microsoft.Uii.Csr.AifWpfShellBase`1.StartApplication()
   at Microsoft.Crm.Accelerator.Cca.WpfDesktop.Program.Main() in C:\Program Files (x86)\Microsoft Uii\CCA\Source Code\AgentDesktop\Program.cs:line 94

Jul 9, 2012 at 9:18 PM

Off the top of my head,  You have 2 UII Options configured with the same name..

Mattb-msft.

Jul 10, 2012 at 7:20 AM

Ok, but how it can be. I download the solution and changed nothing.

Do you know which option must I change to fix the error?

Thanks
Tobi.

Jul 15, 2012 at 12:03 AM

Take a look at the Options entity in CRM. Login to CRM, Goto Settings, then UII Settings, you will find Options there.

Take a look to see if there is a duplicate key.

Mattb.

Jul 16, 2012 at 2:20 PM

That was it!!

Thanks
Tobi