Thursday 15 September 2011

(414) Request-URI Too Large when creating pdf in asp.net -


After

I am using the following code (asp.net) to show a PDF for the user:

< Pre> Answer Contact type = "application / pdf"; Response.AddHeader ("content-displacement", "attachment; filename = the.pdf.pdf"); // data is created with a PDF iTextSharp Response.OutputStream.Write (data, 0, datalength); Rispans.and ();

Sometimes users receive an error. I have not been able to create this problem, but this is what I have seen in my logs and it always seems like Mozilla 4 or 5 is the problem:

  error message: remote The server sent an error: (414) Request-URI is too large Error Source: System Error Target Site: System.Net.WebResponse GetResponse () Exception Stack Trace: ------------- Bundle error on the System.Web.U.Page.ProcessRequestMain at System.Web.UI.Page (exception e) on System.Web.UI.Page.ProcessRequest (Boolean Include Steshnsafsansikpoint, Boolean include StageAfterAsyncPoint) system. On Web.UI.Page.ProcessRequest (Boolean includes StagesBeforeAsyncPoint, Boolean contains StageAfterAsyncPoint) () on System.Web.UI.Page.ProcessRequestWithNoAssert (HttpContext Reference) on System.Web.UI.Page.ProcessRequest (HttpContext Reference) ASP.my_doexport_aspx.ProcessRequest (HttpContext Reference) on System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute () on System.Web.HttpApplication.ExecuteStep (IExecutionStep step, boolean & completedSynchronously) server Variable: ----------------- ALL_HTTP: HTTP_CACHE_CONTROL: A cache HTTP_CONNECTION: Keep-Alive HTTP_ACCEPT: image / gif, image / jpeg, image / pjpeg, image / pjpeg, application / X-Shockwave-Flash, App / vnd.ms-excel, application / vnd.ms-p Pointpoint, application / msword, * / * HTTP_ACCEPT_ENCODING: gzip, deflate HTTP_ACCEPT_LANGUAGE: HTTP_COOKIE: ASP.NET_SessionId = xxxxxxxxxxxxa0jo0pxxxxxx; Kaspsformsdddo = Ksksks436F9868l22C336ClE358DBFBlE908F3767FABAEF5338CF62C785ADD6AEA23F8663B4l3A7C0634DC40F8DCD3Bl0889CB0FB4CEEl86l7FB8BlE87C9655AE69C274AlAD0A5F47D95BF8D502F459D05D09A2B0E369lC6737B679F72C6B0XXXXX; __utma = 213584726.23687335.1259423588.1259423588.1259423588.1; __utmb = 213584726.10.10.1259423588; __utmc = 213584726; __utmz = 213584726.1259423588.1.1.utmcsr = (direct) | Utmccn = (direct) | Utmcmd = (None) HTTP_HOST: www.domain.com HTTP_REFERER: http: //www.domain.com/export.aspx HTTP_USER_AGENT: Mozilla / 4.0 (compatible; MSIE 8.0, Windows NT 5.1, Trident / 4.0; GTB6.3 ; .NET CLR 1.1.4322)  

I have not found a solution to the problem, do you have any ideas on how to solve it?

After the

error message is clear about request-URI . The problem is nothing with your feedback ; What is the URL to generate an error?


No comments:

Post a Comment