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

Free Support Forum - aspose.com

Docx treated as unknown file format in word viewer

When I upload a word file of .doc format, it uploads successfully. But when I try latest word template **.**docx, It generates exception at the line:

doc = new Document(inputFile.Value); //Unknown file format

Invalid file format unhanled by user code.
What’s the way to support this format…???
I need help.

Thanks for your request. We have just released a new version of Aspose.Words. The main feature in Aspose.Words for .NET 5.0.0 is load and save of DOCX documents reaching its Release status. So please try using this version.
The new version of Aspose.Words is available for download from here.
If this will not help you, then please attach your template here for testing.
Best regards.

I’ve used Aspose.Words for .NET 5.0.0 and now Word Viewer displays the document (.doc, .docx etc.) properly. But there is problem. I saved the document into the database. When I download a document of .doc format no problem occurs but when the format is .docx

///Code I've written to download a doc
MemoryStream ms = new MemoryStream(objDocumentArchive.ByteDocument);
Document doc = new Document(ms);
doc.Save(newFileName, SaveFormat.Docx, SaveType.OpenInWord, this.Response);

and I try to Open the document, it opens but before that some messages appear. I’ve attached those pictures. Please find the attachment and tell me how to avoid those.
I’ve another query: We’ve purchase Aspose license few days back. The dll is older versio, now I’ve replaced that dll with Aspose.Words for .NET 5.0.0. I need to update the lic or the previous lic will work fine…???


  1. I managed to reproduce this problem. I have created new issue # 4430 in our defect database. Please expect a reply before the next hotfix (within 2-3 weeks). We might just fix it by then or provide more information.
  2. No, you don’t need to update your lic. Every Aspose license carries a one-year subscription for free upgrades to any new versions or fixes that come out during this time.
    Best regards.

Whenever u fix the problem please let me know.

Ok, I will notify you as soon as it is done.
Best regards.

I don’t think this is a bug.
You simply need to end the response after saving.

// You have to do this I think.

It’s working fine.