Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bulk #70

Open
baskarbsk opened this issue Sep 24, 2018 · 8 comments
Open

Bulk #70

baskarbsk opened this issue Sep 24, 2018 · 8 comments
Labels

Comments

@baskarbsk
Copy link

Unable to load Bulk Data (150k Records) But in reporting services, I am able to load more than 150k records, Pls help on this.

@alanjuden
Copy link
Owner

@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.

@baskarbsk
Copy link
Author

baskarbsk commented Sep 25, 2018

@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.

@alanjuden
Copy link
Owner

@baskarbsk, can you share a little bit about your setup? Are you using the .NetCore version or the full .net framework version?

@baskarbsk
Copy link
Author

baskarbsk commented Sep 28, 2018 via email

@alanjuden
Copy link
Owner

@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

@Yeosc
Copy link

Yeosc commented Jun 25, 2019

@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.

@baskarbsk
Copy link
Author

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;

@PandaInTown
Copy link

@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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants