Some sites do not allow you to request the same file twice (IDM)

Some sites do not allow you to request the same file twice :

enter image description here

I am facing the previous error when I try to load my pdf into button click event

:


 private void AddReportToResponse(LocalReport report )
        {
            string mimeType;
            string encoding;
            string extension;
            string[] streams = new string[100];
            Warning[] warnings = new Warning[100];
            Response.Clear();
            byte[] pdfStream = report.Render("PDF", "", out mimeType, out encoding, out extension, out streams, out warnings);

            Response.ContentType = mimeType;
            Response.AddHeader("content-disposition", "attachment; filename=Application." + extension);
            Response.BinaryWrite(pdfStream);
            Response.End();

        }

      

+3


source to share


2 answers


I fixed my problem.

The problem was about Ajax:



 <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
                        <AjaxSettings>
                            <telerik:AjaxSetting AjaxControlID="rbtn_generate">
                                <UpdatedControls>
                                    <telerik:AjaxUpdatedControl ControlID="GV_Shift_employees" />
                            </UpdatedControls>
                        </telerik:AjaxSetting>
</telerik:RadAjaxManager>

      

0


source


You can implement resume upload function for asp.net:

https://code.msdn.microsoft.com/Implement-resume-in-aspnet-c1bbde36



Another option is to host the PDF file if you have static report files (for a reasonable amount of time temporarily) and redirect them to the same (be sure to use the same filename every time). This way the url for the pdf will remain the same and will support download resume.

0


source







All Articles