Reputation: 30993
On a specific web server I'm taking the default printer and using it to create a device context for printing; I'm facing the following issue using CreateMeasurementGraphics
.
Using this code (VB .NET sorry :-( ):
Dim ps As PageSettings = GetPageSettings(parms)
Dim pr As PrinterSettings = GetPrinterSettings()
printerGraphics = pr.CreateMeasurementGraphics(ps)
I'm getting:
System.Reflection.TargetInvocationException: Eccezione generata dalla destinazione di una chiamata. ---> System.OutOfMemoryException: Memoria insufficiente. in System.Drawing.Graphics.FromHdcInternal(IntPtr hdc) in System.Drawing.Printing.PrinterSettings.CreateMeasurementGraphics(PageSettings pageSettings) in Sistemi.Builder.Tools.Printing.EmfDC.OnPageChanged(PrintPageParms parms)
(translated is OutOfMemory)
What I have checked:
I'm going crazy...
Upvotes: 0
Views: 267
Reputation: 30993
Solved; it's a known issue caused by a combination of 64bit server-enable 32bit on the application pool-impersonation.
To solve the issue it must be removed the enable 32bit flag on the application pool.
Upvotes: 1