Server Error in '/' Application.

The specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters, and the directory name must be less than 248 characters.

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.PathTooLongException: The specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters, and the directory name must be less than 248 characters.

Source Error:


Line 35:             Response.AddHeader("Content-Disposition", "attachment; filename=" + pdfResultName);
Line 36: 
Line 37:             MemoryStream m = HTMLToPDF.HTMLToPDF.CreatePDF(htmlContent);
Line 38: 
Line 39:             Response.OutputStream.Write(m.GetBuffer(), 0, m.GetBuffer().Length);

Source File: c:\inetpub\wwwroot\www.paraninfo.com.ar\PDFUrl.aspx.cs    Line: 37

Stack Trace:


[PathTooLongException: The specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters, and the directory name must be less than 248 characters.]
   System.IO.Path.LegacyNormalizePath(String path, Boolean fullCheck, Int32 maxPathLength, Boolean expandShortPaths) +14553489
   System.IO.Path.GetFullPathInternal(String path) +139
   System.IO.Path.GetFullPath(String path) +11
   iTextSharp.text.Utilities.ToURL(String filename) +110
   iTextSharp.text.html.simpleparser.ElementFactory.CreateImage(String src, IDictionary`2 attrs, ChainedProperties chain, IDocListener document, IImageProvider img_provider, Dictionary`2 img_store, String img_baseurl) +347
   iTextSharp.text.html.simpleparser.HTMLWorker.CreateImage(IDictionary`2 attrs) +510
   iTextSharp.text.html.simpleparser.HTMLTagProcessor_IMG.StartElement(HTMLWorker worker, String tag, IDictionary`2 attrs) +44
   iTextSharp.text.html.simpleparser.HTMLWorker.StartElement(String tag, IDictionary`2 attrs) +130
   iTextSharp.text.xml.simpleparser.SimpleXMLParser.Go(TextReader reader) +1265
   iTextSharp.text.html.simpleparser.HTMLWorker.Parse(TextReader reader) +126
   iTextSharp.text.html.simpleparser.HTMLWorker.ParseToList(TextReader reader, StyleSheet style, IDictionary`2 tags, Dictionary`2 providers) +142
   iTextSharp.text.html.simpleparser.HTMLWorker.ParseToList(TextReader reader, StyleSheet style) +15
   HTMLToPDF.HTMLToPDF.CreatePDF(String htmlContent) +349
   PDFUrl.GeneratePDF(String htmlContent, String pdfResultName) in c:\inetpub\wwwroot\www.paraninfo.com.ar\PDFUrl.aspx.cs:37
   PDFUrl.Page_Load(Object sender, EventArgs e) in c:\inetpub\wwwroot\www.paraninfo.com.ar\PDFUrl.aspx.cs:21
   System.Web.UI.Control.OnLoad(EventArgs e) +108
   System.Web.UI.Control.LoadRecursive() +90
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1533


Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.8.4700.0