TargetInvocationException error when opening eNICQ 5

Problem:

*Update: This issue is associated with Active Directory logins in eNICQ version 5.4.x and earlier.  It will be corrected in versions 5.5.x and later.

 Attempting to open eNICQ 5 the user receives an error saying "Exception has been thrown by the target of an invocation" and the application will close.

If you have multiple instances of the client application installed you will receive this error on each of the workstations.

When you check the call stack you should see reference to "DataAccess.UserData".

eg.

Type : System.ArgumentException, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
Message : An item with the same key has already been added.
Source : mscorlib
Help link :
ParamName :
Data : System.Collections.ListDictionaryInternal
TargetSite : Void ThrowArgumentException(System.ExceptionResource)
Stack Trace : at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource)
at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
at System.Collections.Generic.Dictionary`2.Add(TKey key, TValue value)
at VermontOxford.ENICQ.Infrastructure.Module.Services.DataAccess.UserData..ctor(IDataProvider dataProvider, IItemFactory itemFactory)

 

Solution:

Resolution of this issue will require support from a database administrator or IT professional with similar skills and access.

Open SQL Management Studio and in the enicqdb database open the tblUsers table. You should spot duplicate users in there.

To resolve this problem, Vermont Oxford Network asks that the contents of tblUsers be output to text file (such as CSV format) and set to our support team at support@vtoxford.org.  Our team will generate and return one or more SQL scripts to correct the problem based on the record conflict identified.  

In the event that it is unclear which account is in active use by the end user, it may be necessary to review tblEventLog to determine the active account.

Due to the key fields involved and connection to event logging, it is important to work with VON staff for resolution.

Have more questions? Submit a request

Comments

  • Avatar
    Joe Grabon

    I discovered how this occurs. It will only happen the first time someone logs into eNICQ 5 the first time and the user is added to tblUsers. When they first open eNICQ 5, if they try launching it again before it opens they will have eNICQ 5 running twice on the same workstation using the same account.  It will create the duplicate record.