Could not load file or assembly 'System.Memory, Version=4.0.1.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' or one of its dependencies. The system cannot find the file specified. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.IO.FileNotFoundException: Could not load file or assembly 'System.Memory, Version=4.0.1.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' or one of its dependencies. The system cannot find the file specified. Source Error: Line 73: string dir = Server.MapPath("~/app/surveyor/"); Line 74: // save resulting pdf into file Line 75: pdf.SaveAs(Path.Combine(dir, "ChromePdfRenderer.Pdf")); Line 76: } Line 77: } Source File: d:\irshad_work\ship_inspection_original\admin\report.aspx.cs Line: 75 Assembly Load Trace: The following information can be helpful to determine why the assembly 'System.Memory, Version=4.0.1.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' could not be loaded.
public void generate_pdf() { var ChromePdfRenderer = new ChromePdfRenderer(); var html = @"<h1>Hello World!</h1><br><p>This is IronPdf.</p>"; // turn html to pdf var pdf = ChromePdfRenderer.RenderHtmlAsPdf(html); string dir = Server.MapPath("~/app/surveyor/"); // save resulting pdf into file pdf.SaveAs(Path.Combine(dir, "ChromePdfRenderer.Pdf")); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)