System.NullReferenceException Error

System.NullReferenceException Error

Forum member · Oct 20, 2010
I currently use DynamicPDF Merger for COM (version 4) and am considering moving to the .NET product line (version 6). The following line of C# code generates a "System.NullReferenceException: Object reference not set to an instance of an object." error with the .NET product. MergeDocument mergeDocument = new MergeDocument(MapPath("aa10_order_2009_08.pdf")); The old COM product works fine with this PDF but the new .NET package does not. Can you explain why the .NET package fails and how to correct the problem? I would be glad to submit the PDF file if that helps. Thanks, Mike

Re: System.NullReferenceException Error

Support · Oct 20, 2010
Hello Mike, Seems like the MapPath method is returning a null object. Please check to see if the MapPath method is returning the correct path to the PDF. If you are still getting this error even after the MapPath is returning the object, send the full stack track of the error to our [^a|mailto:support@cete.com|opennewiwndow|Support Team^]. Thanks, ceTe Software Support Team.