create OneNote document in SharePoint.Online which has hyperlink
using Aspose.Note make change of hyperlinks from, for example, www.abc.com to www.doc.com
save document
open document via OneNote.Online (just open it by click in SharePoint)
close document
using same code try to make second change => this does not work as Aspose.Note cannot open document anymore. Error message is:
Problem to open document (error: Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index)
Stack:
at System.Collections.BitArray.Get(Int32 index)
at .()
at .(Int32 )
at .(Int32 )
at . ()
at .( )
at .( )
at .( )
at .( , )
at .()
at .()
at .()
at .()
at .(Stream )
at .(Stream )
at .(Stream , String )
at .(Stream , String , Boolean )
at .(Stream , Document , LoadOptions )
at Aspose.Note.Document.(Stream , LoadOptions )
at Aspose.Note.Document…ctor(Stream inStream, LoadOptions loadOptions)
at Aspose.Note.Document…ctor(Stream inStream)
at our.application
In attachment you can find:
Prep.mp4 => video how to create OneNote file
Result.mp4 => video showing that change of hyperlink is done and then error message in Notepad
VStudioScreenShot.jpg => screenshot with error from VS
Error Message.txt => error message and stack
SourceCode.txt => function used to make change. Unfortunately, we cannot share source code to connect to the SharePoint as this is part of huge project but, at least, in function you can see how is change done.
If same code is used against locally saved OneNote documents created with OneNote 2016 using same process there is no problem to read document with Aspose.Note after document is changed with Aspose.note and then opened by OneNote 2016.
We evaluated your issue and tried to reproduce the issue on our end, but with no success. We performed all steps you specified while using OneNote Web app but final file is read successfully. Can you provide the sample file that failed to be processed by Aspose.Note? We will check your issue soon.
PS. please try using latest version of Aspose.Note for .NET (if you are not already using it).
please find attached OneNote document before change (working) and after change (not working).
Process was:
Connect to the SharePoint
Open OneNote document with my app based on latest version of Aspose.Note components
Search for www.abc.com and replace with www.123.com
Open document directly via SharePoint and close it
Try to open document with Aspose.Note and then got error: Problem to open document (error: Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index)
Thanks for sharing sample documents and steps details.
We have logged the resource files and details against your issue in our database. We reproduced the issue. We will investigate and look into your issue soon.
Generally, we do not provide interim fixes in the forum for Aspose.Note for .NET. I guess you may consider purchasing Paid support to get the quick fix.
The issues you have found earlier (filed as NOTENET-5531) have been fixed in this update. This message was posted using Bugs notification tool by alexei.s