PdfEncryptionAlgorithm.RC4_128 performance problem on IIS?

We are using the PDFEncryptionDetails capability to secure a PDF and prevent changes. This works good for us, but one environment suddenly is taking approximately 20 seconds to process this step regardless of the size of the Word document. All other environments take less than one second to process this code. I am wondering if the server this is running on (IIS 8) has RC4 encryptions disabled, could this be causing the latency? Here’s a code snippet where we save the PDF:

Aspose.Words.Document doc = new Aspose.Words.Document(wordDoc);
doc.Save(outStream, getPDFSaveOptions());

private Aspose.Words.Saving.PdfSaveOptions getPDFSaveOptions()
{ 

    Aspose.Words.Saving.PdfSaveOptions pdfSaveOptions = new Aspose.Words.Saving.PdfSaveOptions();
    pdfSaveOptions.UpdateFields = false;
    Aspose.Words.Saving.PdfEncryptionDetails encryptionDetails =
        new Aspose.Words.Saving.PdfEncryptionDetails("", Guid.NewGuid().ToString(), Aspose.Words.Saving.PdfEncryptionAlgorithm.RC4_128);
    encryptionDetails.Permissions = Aspose.Words.Saving.PdfPermissions.DisallowAll;
    pdfSaveOptions.EncryptionDetails = encryptionDetails;

    return pdfSaveOptions;
}

@scottleclerc

Thanks for your inquiry. Please ZIP and attach your input Word document here for testing. Please also share your complete working environment e.g. operating system, IIS version, .NET Framework etc. We will investigate the issue on our side and provide you more information.

The web server is running Windows Server 2012 R2 Standard operating system, IIS 8.5.9600.16384 with .NET Framework 4.7.0558. Please find attached the MS Word file which is an example of a document experiencing the problem.
ENDTOEND–20170718-00000110_Consumer Complaint.zip (24.3 KB)

@scottleclerc

Thanks for sharing the detail. Please spare us some time for the investigation of this issue. We will get back to you soon.

@scottleclerc

Thanks for your patience. We have tested the scenario using the latest version of Aspose.Words for .NET 18.9 on Windows Server 2012 R2 and have not found the shared issue. It seems that the issue is related to IIS performance at your end.