SSL / HTTPS Support for Aspose.Words

Good day!

We are using Aspose.Words to generate word docs on the fly. This works well over http, but over an SSL connection it does not work. Instead, we get an error that says:

Internet Explorer cannot download … {part of the URL} from {www.oursite}. Internet Explorer was not able to open this Internet site. The requested site is either unavailable or cannot be found. Try again later.

Can you help?

Thanks,
Doug
Insala, LLC

Please specify what method do you use to send generated doc to client. Code snippet will be very helpful.

Miklovan, we are currently experiencing the same problem. Here is a code snippet showing the method we’re using to return a word document to the client. This code works fine for HTTP, but not for HTTPS.

Dim docMain As Document

'prepare instance of document

docMain.Save(“OustandingCases.doc”, SaveFormat.Doc, SaveType.OpenInWord, Page.Response)

Any ideas, bug fixes etc? I am aware Aspose.Cells had a similar issue.

Thanks for your help.

Hi,

Thank you for reporting this. I have logged your issue as #1343 and we are going to check the problem soon.

This works absolutely fine in my tests via HTTPS. There must be something wrong with your configuration or code and I have no ideas what.

I installed a self signed certificate on a sever (I had to use a different port, not 443 because it is used for other server), installed Aspose.Words and compiled the the Aspose.Words.Demos project.

I then tried side by side normal HTTP and HTTPS in different browser windows:

http://localhost/Aspose.Words.Demos/Default.aspx
https://localhost:83/Aspose.Words.Demos/Default.aspx

And they worked exactly the same for all documents and all formats.

Next steps for you?

Check your configs, install on a different machine, try with Aspose.Words.Demos like I did, etc.

I believe this is an Internet Explorer only problem (bug). It has to do with how IE caches the document over https (I assume you are not caching the file). I don’t remember the workaround, but you should be able to find it after searching.

It is an IE specific problem, that can be fixed by doing the following:

  • Tools>Internet Options
  • Click the Advanced tab
  • Check the box that says Do not save encrypted pages to disk
    **

Alternatively, since you pass the document the Response object, you might try setting the cachability before you call the Save method:
i.e.

Response.Cache.SetCachebility(HttpCache.NoCache);
document.Save(…, Response);