Open baskarbsk opened 6 years ago
@baskarbsk, how long is it taking to load your report on SSRS? I'm curious if maybe the timeout on your website is set lower than the timeout on your report which makes it not wait long enough. My tool should be able to handle it as it's just communicating directly to your SSRS server.
@alanjuden, Thanks for the quick response. Its takes 1.2min to load entire data in SSRS ReportViewer.aspx, While debugging the application the exception was thrown from the Render2 Method from the Report ServiceHelper.cs (Inner Exception: Operation Timeout (WinHTTPException)) Error Message - Array cant be Null Parameter in bytes. We also tried to set the timeout with infinite(-1) for basic HTTP binding Your help is more precious, Pls help me on this.
@baskarbsk, can you share a little bit about your setup? Are you using the .NetCore version or the full .net framework version?
@alanjuden, thanks for the response.
I am using .NetCore 2.0 version, I am able to load around 80k records without issues, but anything more than that, I am facing an issue, I have optimized stored procedure to the best level, but same issue
Please help me with this,
@baskarbsk, have you tried extending your Timeout property on the ReportController? I just looked it up and the default timeout is for 100,000 milliseconds (100 seconds). If your report needs longer than 100 seconds to send back through the webservice you'd probably need to override that like this in your ReportController.cs:
protected override int? Timeout => 200000; //200 seconds
@alanjuden, we encounter similar issue. After we apply above changes, system still prompt "Report load failed." When call reportservice2005.asmx service from Asp.net core MVC project, small data is working fine, but now we load approx. 190,000 records and above message prompt.
Based on our checking, timeout seems around 30s, I already try increase Asp.net mvc core timeout time in web.config, and also increase it in program.cs. In asmx, we also manually set sendTimeout, ReceiptTimeOut,CloseTimeout and Opentimeout with binding.
For SSRS server side we try increase httpruntime executiontimeout in web.config, and also change rsreportserver.config and tried increase timeout for report, like set embedded dataset timeout to 6mins.
For your information, we already try to run this report from SSRS web Url and it load around 40 seconds, means its not relate to Report side.
So is there any other place that we need to take a look? We not sure for asmx service how SSRS config its timeout. Seek for your help. Thank in advance.
Increase the service timeout, I have attached the code for your reference and also implement SQL paging concept to fetch the records.
ReportServiceHelpers._initializeHttpBinding()
var binding = new System.ServiceModel.BasicHttpBinding(System.ServiceModel.BasicHttpSecurityMode.TransportCredentialOnly); binding.Security.Transport.ClientCredentialType = model.ClientCredentialType; binding.MaxReceivedMessageSize = int.MaxValue; binding.CloseTimeout = TimeSpan.MaxValue; binding.OpenTimeout = TimeSpan.MaxValue; binding.ReceiveTimeout = TimeSpan.MaxValue; binding.SendTimeout = TimeSpan.MaxValue;
GetReportParameters()
var service = new ReportService.ReportingService2005SoapClient(basicHttpBinding, new System.ServiceModel.EndpointAddress(url)); service.ClientCredentials.Windows.AllowedImpersonationLevel = System.Security.Principal.TokenImpersonationLevel.Impersonation; service.ClientCredentials.Windows.ClientCredential = (System.Net.NetworkCredential)(model.Credentials ?? System.Net.CredentialCache.DefaultCredentials); service.InnerChannel.OperationTimeout = TimeSpan.MaxValue;
ExportReportToFormat
var basicHttpBinding = _initializeHttpBinding(url, model); var service = new ReportServiceExecution.ReportExecutionServiceSoapClient(basicHttpBinding, new System.ServiceModel.EndpointAddress(url)); service.ClientCredentials.Windows.AllowedImpersonationLevel = System.Security.Principal.TokenImpersonationLevel.Impersonation; service.ClientCredentials.Windows.ClientCredential = (System.Net.NetworkCredential)(model.Credentials ?? System.Net.CredentialCache.DefaultCredentials); service.InnerChannel.OperationTimeout = TimeSpan.MaxValue;
@alanjuden I am facing the similar issue as @Yeosc
This is my setting ... ReportController:: protected virtual int? Timeout { get { return -1;}}
ReportServiceHelper
_initializeHttpBinding::
var binding = new System.ServiceModel.BasicHttpBinding(System.ServiceModel.BasicHttpSecurityMode.TransportCredentialOnly);
binding.Security.Transport.ClientCredentialType = model.ClientCredentialType;
binding.MaxReceivedMessageSize = int.MaxValue;
if (model.Timeout.HasValue)
{
if (model.Timeout == System.Threading.Timeout.Infinite)
{
binding.CloseTimeout = TimeSpan.MaxValue;
binding.OpenTimeout = TimeSpan.MaxValue;
binding.ReceiveTimeout = TimeSpan.MaxValue;
binding.SendTimeout = TimeSpan.MaxValue;
}
else
{
binding.CloseTimeout = new TimeSpan(0, 0, model.Timeout.Value);
binding.OpenTimeout = new TimeSpan(0, 0, model.Timeout.Value);
binding.ReceiveTimeout = new TimeSpan(0, 0, model.Timeout.Value);
binding.SendTimeout = new TimeSpan(0, 0, model.Timeout.Value);
}
}
GetReportParameters:: var service = new ReportService.ReportingService2005SoapClient(basicHttpBinding, new System.ServiceModel.EndpointAddress(url)); service.ClientCredentials.Windows.AllowedImpersonationLevel = System.Security.Principal.TokenImpersonationLevel.Impersonation; service.ClientCredentials.Windows.ClientCredential = (System.Net.NetworkCredential)(model.Credentials ?? System.Net.CredentialCache.DefaultCredentials); service.InnerChannel.OperationTimeout = TimeSpan.MaxValue;
ExportReportToFormat:: var service = new ReportServiceExecution.ReportExecutionServiceSoapClient(basicHttpBinding, new System.ServiceModel.EndpointAddress(url)); service.ClientCredentials.Windows.AllowedImpersonationLevel = System.Security.Principal.TokenImpersonationLevel.Impersonation; service.ClientCredentials.Windows.ClientCredential = (System.Net.NetworkCredential)(model.Credentials ?? System.Net.CredentialCache.DefaultCredentials); service.InnerChannel.OperationTimeout = TimeSpan.MaxValue;
Exception thrown from var result = service.Render2(executionInfo.ExecutionID, renderRequest).Result; Err (InnerException): {System.ServiceModel.CommunicationException: An error occurred while sending the request. ---> System.Net.Http.HttpRequestException: An error occurred while sending the request. ---> System.Net.Http.WinHttpException: The operation timed out at System.Threading.Tasks.RendezvousAwaitable`1.GetResult()
Please advise anything I need amend?
Unable to load Bulk Data (150k Records) But in reporting services, I am able to load more than 150k records, Pls help on this.