Spire.Doc is a professional Word .NET library specifically designed for developers to create, read, write, convert and print Word document files from any .NET platform (C#, VB.NET, ASP.NET, .NET Core) and Java applications (J2SE and J2EE) with fast and high quality performance.

Wed Jun 20, 2012 7:33 pm

I am getting the following error when attempting to
make a call to LoadFromFile using the attached file (attached doc file would not upload due to the following error -
The extension doc is not allowed.
The upload was rejected because the uploaded file was identified as a possible attack vector.)

spireDoc.LoadFromFile(fileTemplate, FileFormat.Doc);

at dc..ctor(String A_0, STGM A_1)
at h8.f(String A_0)
at h8..ctor(String A_0, Boolean A_1)
at hs..ctor(String A_0)
at Spire.Doc.Document.LoadFromFile(String fileName)
at Spire.Doc.Document.LoadFromFile(String fileName, FileFormat fileFormat, String password)
at Spire.Doc.Document.LoadFromFile(String fileName, FileFormat fileFormat)
at WordDOCTemplateMacroTranslator.MacroTranslator.BuildCustomerLetter(String fileTemplate) in D:\Development\WC2WordCorrespondenceCreatorTestHarness\WordDOCTemplateMacroTranslator\MacroTranslator.cs:line 34
at WC2WordCorrespondenceCreatorTestHarness.Form1.btnGeneratePDF_Click(Object sender, EventArgs e) in D:\Development\WC2WordCorrespondenceCreatorTestHarness\WC2WordCorrespondenceCreatorTestHarness\Form1.cs:line 44

Posts: 10
Joined: Thu Jun 14, 2012 7:18 pm

Thu Jun 21, 2012 2:47 am

Hi ,

Thanks for your inquiry and so sorry for the inconvenience caused by us.

We've created a research on this problem, but we can't reproduce it. Could you please send your doc file to our support e-mail(support@e-iceblue.com) to help us research this problem? Thanks for your understanding and cooperation.

Have a great day!

Best wishes.
e-iceblue support
User avatar

Posts: 154
Joined: Thu Oct 20, 2011 2:53 am

Mon Jun 25, 2012 2:34 pm

Thank you for pointing that out that the extention may have read .doc but the actual file was html based. I should have checked before wasting your time. Please accept my apologies for not looking past the initial error. I have converted the html to the doc format and all works as it should.

Thanks again.

Posts: 10
Joined: Thu Jun 14, 2012 7:18 pm

Wed Jun 27, 2012 7:17 am

Hi itsupport,

It doesn't matter . If you have any problems, welcome to contact us!
e-iceblue support
e-iceblue support team
contact: nancy.wang@e-iceblue.com
User avatar

Posts: 51
Joined: Wed May 30, 2012 2:02 am

Return to Spire.Doc