Hello,
I am getting an exception from aspose when trying to load a word document from a stream. I've included the document as an attachment and this is all the relevant code we use in regards to this file.
To test it al you need to do is create a webproject and drop a fileuploadbox and button to submit on a form (due to the structure of our project we use the findcontrol function to locate the uploadbox. adjust the name of uplFile to the name of your fileuploadbox).
I am using aspose.words version 3.7.1.0 which is, as far as I know, the lastest version.
-----
Dim PostedFile As System.Web.HttpPostedFile = CType(Page.FindControl("uplFile"), System.Web.UI.HtmlControls.HtmlInputFile).PostedFile
Dim Filename As String = System.IO.Path.GetFileName(PostedFile.FileName)
PostedFile.SaveAs("C:\temp\" & Filename)
Dim doc As Aspose.Words.Document = New Aspose.Words.Document(PostedFile.InputStream)
-----
The error message:
Source Error:
Line(30) : Dim Filename As String = System.IO.Path.GetFileName(PostedFile.FileName)
Line(31) : PostedFile.SaveAs("C:\temp\" & Filename)
Line(32) : Dim doc As Aspose.Words.Document = New Aspose.Words.Document(PostedFile.InputStream)
[ArgumentOutOfRangeException: Specified argument was out of the range of valid values.
Parameter name: value]
Aspose.Words.ListLevel.set_RestartAfterLevel(Int32 value)
ഁ..ជ(ListLevel ឈ)
ഁ..ច(ၸ ၩ)
ഁ..ខ()
ഁ..֟(ᅗ , BinaryReader ֠)
ᄹ.ᄸ.֟()
Aspose.Words.Document.(Stream ղ, String भ)
Aspose.Words.Document.ڴ(Stream ղ, LoadFormat , String भ)
Aspose.Words.Document..ctor(Stream stream, String baseUri, LoadFormat loadFormat, String password)
Aspose.Words.Document..ctor(Stream stream, String baseUri)
Aspose.Words.Document..ctor(Stream stream)
Testproject.WebForm1.Button1_Click(Object sender, EventArgs e) in c:\inetpub\wwwroot\Testproject\WebForm1.aspx.vb:32
System.Web.UI.WebControls.Button.OnClick(EventArgs e)
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument)
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
System.Web.UI.Page.ProcessRequestMain()