Tech Support;
I have been trying to deploy my solution to our web server (works fine on my local machine) but get the following error:
System.ApplicationException: Can’t open image file C:\DOCUME~1\DSAPPS1\ASPNET\LOCALS~1\Temp\Aspose.Word.632387039588861699.001.Jpeg
at Aspose.Pdf.Figure.aa.a(ImageFileType A_0, String A_1, String A_2, String A_3, Int32 A_4, Int32 A_5, Boolean A_6, Boolean A_7, Byte[] A_8) at Aspose.Pdf.Xml.k.a(Pdf A_0, Section A_1, Table A_2, Row A_3, Cell A_4, Image A_5, a A_6, w A_7, Boolean A_8) at Aspose.Pdf.Xml.u.a(Pdf A_0, Section A_1, a A_2) at Aspose.Pdf.Xml.ar.a(Pdf A_0) at Aspose.Pdf.Xml.aa.a(a A_0, Pdf A_1) at Aspose.Pdf.Pdf.Save(String fileName, SaveType saveType, HttpResponse response) at DSDMSCorrLtrs.WebForm1.dgCorrLtrs_ItemCommand(Object source, DataGridCommandEventArgs e)
The following code produces the error:
Dim loArray As Byte()
Dim loProxy As New CorrLtrWS.CorrLtrs ’ web service
call
Dim loDoc As Aspose.Word.Document
Dim loWord As New Aspose.Word.Word
loArray = loProxy.GetStream(strFileNamePath)
Dim loStream As New MemoryStream(loArray)
Dim xmlDoc As XmlDocument = New XmlDocument
xmlDoc.Load(loStream)
'Read the document in Aspose.Pdf.Xml format into Aspose.Pdf.
Dim pdf As Aspose.Pdf.Pdf = New Aspose.Pdf.Pdf
pdf.BindXML(xmlDoc, Nothing)
'Instruct to delete temporary image files.
pdf.IsImagesInXmlDeleteNeeded = True
'Produce the PDF file.
pdf.Title = “Correction Letter”
pdf.Save(“Document”, Aspose.Pdf.SaveType.OpenInBrowser,
Me.Response) ’ line it breaks on
Me.Response.End()
End If
Catch ex As Exception
lblAppNo.Visible = True
lblAppNo.Text = ex.GetBaseException.ToString
End Try
I have even tried to setting the permissions on the folder, but still no luck.
Any Ideas?