.NET web application on Windows 2008 R2 Webserver only able to address 16 GB RAM, not 32 - why?
We are trying to run a .NET 4 web application (on an 8 GB, 8 core Windows 2008 R2 64bit Webedition server) that creates Word mailmerge documents, using Spire.doc. Everything works fine up to around 5.000 records. If we try to merge more, physical as well as virtual memory both consume all they can, around 8 GB each.
Question: according to http://msdn.microsoft.com/en-us/library/aa366778%28v=vs.85%29.aspx#physical_memory_limits_windows_server_2008_r2, Windows 2008 R2 64bit would give you 32 GB.
So how can I make the application use more virtual memory?
Here's the code, but I think the question is rather generic (and yes, creating Word documents with 10.000 pages may seem ridiculous, but this is what the customer desires, and yes, we will talk him out of it):
private static void Merge(DataTable recipients, string template, string s开发者_运维问答aveAs)
{
Document document = new Document();
document.LoadFromFile(template);
document.MailMerge.Execute(recipients);
document.ViewSetup.DocumentViewType = DocumentViewType.PrintLayout;
document.SaveToFile(saveAs, FileFormat.Doc);
}
You could try to compile your web application in in x64 mode.
精彩评论