Hi, team.
My site is Asp Net MVC 5 with AspNet Identity and my Stimulsoft is 2015.1.0.
In my localhost the download PDF file is working fine,
But in web (deployed) the PDF file Download not work (ERR_TOO_MANY_REDIRECTS). The viewer works.
The site is ssl (my localhost too)
The code:
public FileResult ExportReport()
{
var report = StiMvcViewerFx.GetReportObject(this.Request);
StiPdfExportService service = new StiPdfExportService();
StiPdfExportSettings settings = new StiPdfExportSettings();
settings.ImageQuality = 0.75f; // 0.95f;
settings.ImageResolution = 096.0f; // 300.0f;
MemoryStream stream = new MemoryStream();
service.ExportPdf(report, stream, settings);
return File(stream.ToArray(), "application/pdf", "Report.pdf");
}
I need help.
Thanks
Paulo Mussolini
Download PDF ERR_TOO_MANY_REDIRECTS
-
PauloMussolini
- Posts: 1
- Joined: Sat Sep 02, 2017 11:37 pm
Re: Download PDF ERR_TOO_MANY_REDIRECTS
Hello,
In this action, the viewer itself exports the report, and there is no need to export it yourself. Therefore, this error occurs.
Instead of the code:
You can use:
Thank you.
In this action, the viewer itself exports the report, and there is no need to export it yourself. Therefore, this error occurs.
Instead of the code:
Code: Select all
...
MemoryStream stream = new MemoryStream();
service.ExportPdf(report, stream, settings);
return File(stream.ToArray(), "application/pdf", "Report.pdf");Code: Select all
...
return StiMvcViewer.ExportReportResult(report, settings);