We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Report Server as Azure App Service

So I decided to give it a go, as we are trying to move away from the VMs that are necessary for Microsoft SSRS. So when I tried the samples, it is successfully loading the report from the sample reporting server (http://reportserver.syncfusion.com:80/) using the following code. But the same code won't load the same report from my server (http://transomsyncfusion.azurewebsites.net:80/) using the same code. By the way, I am using AzureBlobStorage as the store, if that is of any significance.

The error that I get is Load the Report for PDF Writer is on the line reportWriter.Save(fileName, format, httpContext.Response);

        string fileName = null;
        WriterFormat format;
        HttpContext httpContext = System.Web.HttpContext.Current;
        ReportWriter reportWriter = new ReportWriter();
        reportWriter.ReportPath = "/Sample Reports/Company Sales";
                reportWriter.ReportServerUrl = "http://reportserver.syncfusion.com:80/";
                reportWriter.ReportingServer = new ReportingServerExt();
        reportWriter.ReportServerCredential = new System.Net.NetworkCredential("guest", "demo");
                reportWriter.ReportProcessingMode = ProcessingMode.Remote;

                if (writerFormat == "PDF")
                {
                    fileName = "Company Sales.pdf";
                    format = WriterFormat.PDF;
                }
                else if (writerFormat == "Word")
                {
                    fileName = "Company Sales.doc";
                    format = WriterFormat.Word;
                }
                else if (writerFormat == "Html")
                {
                    fileName = "Company Sales.Html";
                    format = WriterFormat.HTML;
                }
                else
                {
                    fileName = "Company Sales.xls";
                    format = WriterFormat.Excel;
                }
                reportWriter.Save(fileName, format, httpContext.Response);

1 Reply

MM Mageshyadav M Syncfusion Team December 24, 2018 06:48 AM

Hi Muhammad,   
 
We have finally found the cause for samples not running on your side. The Azure app has updated the TLS Version to 1.2 recently, in which our previous samples will not work. In order to overcome that, we request you to add the below code in the application startup ‘Global.asax’ file and add its reference ‘using System.Net’ as shown in the below image to run the sample on your side. 
 
C#:  
  
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls | SecurityProtocolType.Tls11 | SecurityProtocolType.Tls12;  
 
  
 
Regards, 
Mageshyadav.M 


Loader.
Live Chat Icon For mobile
Up arrow icon