Problem / Solution: Xtraction Error when trying to send a report / dashboard... "System.TypeInitializationException: The type initializer for 'DevExpress.XtraPrinting.GdiGraphics' threw an exception. ---> System.ArgumentException: Parameter is not valid."

Version 2

    Environment:


    Xtraction all versions


    Error message:


    In the Xtraction log file, you can find;

    Date : 15/12/2015 8:13:17 AM

    Querystring :

    IP : 10.1.1.25

    User Id : 61

    Machine User Id : TEST\Service

    System.TypeInitializationException: The type initializer for 'DevExpress.XtraPrinting.GdiGraphics' threw an exception. ---> System.ArgumentException: Parameter is not valid.

      at System.Drawing.Image.FromStream(Stream stream, Boolean useEmbeddedColorManagement, Boolean validateImageData)

      at DevExpress.Utils.ResourceImageHelper.CreateImageFromResources(String name, Assembly asm)

      at DevExpress.XtraPrinting.GdiGraphics..cctor()

      --- End of inner exception stack trace ---

      at DevExpress.XtraPrinting.GdiGraphics..ctor(Graphics gr, PrintingSystemBase ps)

      at DevExpress.XtraPrinting.Export.Imaging.OnePageImageGraphicsFactory.CreateGraphics(Image img, PrintingSystemBase ps)

      at DevExpress.XtraPrinting.Export.Imaging.ImageDocumentBuilderBase.CreateImage(Stream stream, ImageFormat format)

      at DevExpress.XtraPrinting.PrintingSystemBase.ExportToImage(Stream stream, ImageExportOptions options)

      at 1.0.0(XRChart , Boolean , String , ComponentExportOptions )

      at 1.4.Export(Component component, ComponentExportOptions options, XmlResult componentData, Int32 width, Int32 height, Boolean includeHeadings, Boolean resizeToFullPage)

      at 3.7.0(PivotComponent , ComponentExportOptions , XmlResult , 4 )

      at 3.7.AddToDocument(Component component, ComponentExportOptions options, XmlResult componentData, 4 parameters)

      at SqlDataEngine.Export.Components.ComponentCollectionExporter.0(String , List`1 , ComponentExportOptions )

      at SqlDataEngine.Export.Components.ComponentCollectionExporter.Export(String title, List`1 components, ComponentExportOptions options)

      at Xtraction.Service.ExportService.0(String , List`1 , ComponentExportOptions , String )

      at Xtraction.Service.ExportService.ExportDashboard(Dashboard dashboard, ComponentExportOptions options)

      at Xtraction.Web.Services.ExportWebService.ExportDashboard(Dashboard dashboard, ComponentExportOptions options)



    Problem:


    It's becoming impossible to send some reports etc. through the scheduler.

     

    Solution / Workaround:


         1- TEST 1: Restart the Xtraction Pool in IIS Manager on your Xtraction application server (see printscreen below);

        

        


         2- TEST 2: If TEST 1 is not working, then you need to change a setting value in IIS manager on your Xtraction application server (See printscreen below) then restart the Xtraction application pool as shown in TEST 1;


            2a- Click on Advanced settings

        

            2b- Change the value "Load User Profile"

        

        

            2c- Do the same steps shown in TEST 1 and test