We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Bug report: `A value with the specified key has already been added` thrown

Hi there,

from time to time we run into `A value with the specified key has already been added` exception doing the following:

========
// tempStream is a MemoryStream, contains DOCX which can be opened by
// Google Docs / MS Office (attached):
wordDoc = new Document(tempStream);

// ....some checks omitted here...

// Saving back into a MemoryStream in some other method.
wordDoc.Save(tempStream, Aspose.Words.SaveFormat.Docx);
========

Stack trace:
========
StackTrace " at \u000e .\u0002(Object \u0002, Int32 \u0003, Boolean \u0005)\r\n at \u0005 .\u0002(ArrayList \u0002)\r\n at \u000f .\u0003()\r\n at \u000f .\u000f ‚Äč \u0002(\u0005 \u0002)\r\n at Aspose.Words.Document.\u0002(Stream \u0002, String \u0003, SaveOptions \u0005)\r\n at FoxTranslate.Services.DocumentDelivery.Channels.TrDeliverableFileProvider.SaveDocToS3(S3FileId id, Document wordDoc, SaveFormat saveFormat, String contentType) in C:\\work\\revdotcom\\FoxTranslate\\Services\\DocumentDelivery\\Channels\\TrDeliverableFileProvider.cs:line 122" string
========

We're running Aspose.Total 15.9.0 and were evaluating 16.12.0 to see if this problem has been fixed. We would like to renew Aspose.Total license, but this is a blocker for us.

Thanks!
Hi Denis,

Thanks for your inquiry. We have tested the scenario using following code example and noticed that Document.Save method throws System.InvalidOperationException. For the sake of correction, we have logged this problem in our issue tracking system as WORDSNET-14642. You will be notified via this forum thread once this issue is resolved. We apologize for your inconvenience.

Document doc = new Document(MyDir + "birth+cartificate+-audrey+libshitz.docx");

doc.Save(MyDir + "Out v16.12.0.docx");

The issues you have found earlier (filed as WORDSNET-14642) have been fixed in this Aspose.Words for .NET 17.2.0 update and this Aspose.Words for Java 17.2.0 update.


This message was posted using Notification2Forum from Downloads module by aspose.notifier.

The issues you have found earlier (filed as ) have been fixed in this update. This message was posted using BugNotificationTool from Downloads module by MuzammilKhan