Free Support Forum - aspose.com

Nearly empty documents created

For a period of time all the Word documents on our web server which were generated by Aspose.Words for .NET (version 9.5) looked similar to the two documents I’ve attached to this message. We don’t know root cause. The issue appears to have been resolved by resetting IIS. Have you see similar problems in the past?


Thanks,
Mark Novick
software engineer
ASC

Hi Mark,

Thanks for your request. No, unfortunately, nobody reported such problem in past. Maybe there is something in your code that causes this issue. Could you please create a simple application that will allow us to reproduce the problem? We will check it and provide you more information.

Best regards,

Unfortunately we have been unable to reproduce the problem. The problem occurred for all documents that were generated for a short time period, but went away after resetting IIS. Please leave the issue open for now in case other customers see a similar problem in the future.


Hi

Thank you for additional information. Do you call RemoveAllChildren method somewhere in your code? Maybe in some conditions this method is called right before saving the document and that is why it becomes empty.

Best regards,

No, we don’t call RemoveAllChildren at all.


Thanks,
Mark Novick
software engineer
ASC

Hi

Thank you for additional information. Your documents look like everything is removed from each section. DO you have any code that removes content from sections?

Best regards,

Yes, we do have code that removes content from sections. For example we have code that removes text between a bookmark start and bookmark end if it appears that the bookmarked text should not be present. We leave the bookmarks in the final document, even if the text between them is removed.


In the problematic file I sent there were no bookmarks. However, the original template document used to create them contained bookmarks, so the output file should always contain these bookmarks. Also we never bookmark the entire text of the document, just certain portions of it.

Also note that we used the same code thousands of times before and never had problems with empty files. Nor have we had further problems with empty files since I reported the problem. There was just a short period of time where only empty files were created.

Thanks

Hi

Thank you for additional information. Unfortunately, as you understand, it is extremely difficult to guess what the problem is when it is impossible to reproduce the problem. Please let us know if you find something about this problem. We will be glad to help you.

Best regards,