Hi Alexey,
I was speaking to you today about a memory exception I was getting while trying to run aspose.words on windows azure. I’ve created a very simple page that has the following code on the page_load. I created a simple docx that has one line of text. When I run the following i get the error below. I thought i’d send this to you to see if it gives you any clues as to why it might be throwing the error.
Document doc = new Document(Server.MapPath("in.docx"));
Response.Write("page count: " + doc.PageCount);
System.OutOfMemoryException was unhandled by user code
Message="Out of memory."
Source="System.Drawing"
StackTrace:
at System.Drawing.Graphics.FromHwndInternal(IntPtr hwnd)
at System.Drawing.Graphics.FromHwnd(IntPtr hwnd)
at 㘵.㞭.get_㟯()
at 㘵.㞾.ࢮ(String ݺ, Font ࢴ)
at 㘵.㞾.ࢮ(String ݺ)
at 㘵.ᘖ.get_ጓ()
at 㘵.ᘖ.get_ދ()
at 㘵.㲺.㲼()
at 㘵.㲺.㚒()
at 㘵.㢰.㚒()
at 㘵.㳩.㲷(㚈 ⃙)
at 㘵.㳩.㳪(㬯 ዻ, 㚈 ⃙, 㳠 㳗)
at 㘵.㳩.㚒(㬯 ዻ, 㳠 㳗)
at 㘵.㳓.㳖(㬯 Ⱑ, 㳠 㳗)
at 㘵.㳓.㳔(㧬 㝐, 㜻 Ṱ)
at 㘵.㳐.㙷(㜻 㘪)
at 㘵.㜻.㙷()
at 㘵.㝙.㙷()
at 㘵.㧘.㙷()
at ᚨ.ӡ.㘧(Document ಣ, Ӣ ⊉)
at Aspose.Words.Document.UpdatePageLayout()
at Aspose.Words.Document.get_ӡ()
at Aspose.Words.Document.get_PageCount()
at Factonomy.AzureSpeedTest_WebRole.Aspose.Page_Load(Object sender, EventArgs e) in C:\Projects\Factonomy.AzureSpeedTest\Factonomy.AzureSpeedTest\Factonomy.AzureSpeedTest_WebRole\Aspose.aspx.cs:line 17
at System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e)
at System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e)
at System.Web.UI.Control.OnLoad(EventArgs e)
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
InnerException:
Best regards
David
This message was posted using Email2Forum by alexey.noskov.