Exception: An item with the same key has already been added on loading OLM file (C# .NET)

@indianseomarketer,

I like to inform that next upcoming version of Aspose.Email for .NET 19.5 will be available for download by end of May 2019. If the concerned tickets will be resolved, we will share the automatic notification with you as well.

Is there any update on this? Facing issue with huge number of users. Please update.

@ajaykumar2018,

I like to share that all OLM related issues associated in this thread except EMAILJAVA-34497 which is related to getting folder path for OLM folder have been resolved in Aspose.Email for Java 19.4. You may please try using the suggested version on your end.

Hi,

But i am trying with C# code and getting the following error

System.ArgumentException: An item with the same key has already been added.
at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource)
at System.Collections.Generic.Dictionary2.Insert(TKey key, TValue value, Boolean add) at System.Collections.Generic.Dictionary2.Add(TKey key, TValue value)
at #=zvmgQAt_FxmyC25ABOSlxEBJqWmd0xN9Szw==.#=zDnhyEkw=()
at #=zvmgQAt_FxmyC25ABOSlxEBJqWmd0xN9Szw==.#=zmQgkJC8=()
at Aspose.Email.Storage.Olm.OlmStorage…ctor(String fileName)

@indianseomarketer,

I like to inform that an issue with ID EMAILNET-39469 has been created to resolve issue in .NET as well in our issue tracking system to investigate and resolve the issue. This thread has been linked with the issue so that you may be notified once the issue will be fixed.

Any hope if we get the solution of it? It is long time since we are waiting.

Please give some positive reply

@indianseomarketer,

The concerned issue has been marked as resolved in upcoming Aspose.Email for .NET 19.5 after inclusion of new properties. Please try using following sample code once Aspose.Email for .NET 19.5 will be available online by end of next week.

OlmStorage storage = new OlmStorage(fileName);
PrintPath(storage, storage.FolderHierarchy);

//recursive traversal of all folders
public static void PrintPath(OlmStorage storage, List<OlmFolder> folders)
{
    foreach (OlmFolder folder in folders)
    {
        // print the current folder path
        Console.WriteLine(folder.Path);

        if (folder.SubFolders.Count > 0)
        {
            PrintPath(storage, folder.SubFolders);
        }
    }
}

Hi Team,

I am using the new dll 19.5 but still getting the following error, i have especially purchased the DLL for OLM and it is still not working. What should i do now?

Start LogsSystem.ArgumentException: An item with the same key has already been added.
at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource)
at System.Collections.Generic.Dictionary2.Insert(TKey key, TValue value, Boolean add) at System.Collections.Generic.Dictionary2.Add(TKey key, TValue value)
at #=zvmgQAt_FxmyC25ABOSlxEBJqWmd0xN9Szw==.#=z9bYPBTs=()
at #=zvmgQAt_FxmyC25ABOSlxEBJqWmd0xN9Szw==.#=zAQ25H8U=()
at Aspose.Email.Storage.Olm.OlmStorage…ctor(String fileName)

@indianseomarketer,

I have observed the issue shared by you and request you to please share the OLM file causing issue even after suggested code. We will investigate that further on our end to help you.

i can’t share the olm file here as it contains sensitive data but i can mail you, please provide me your Email ID where i can share the olm file.

@indianseomarketer,

You can pleas share such file using private message with us. Other option is that you upload file on some file server and shared download link with us.

The issues you have found earlier (filed as EMAILNET-39469) have been fixed in this update.

The issues you have found earlier (filed as EMAILJAVA-34497) have been fixed in this update.