Page 1 of 1

Error: Timeout response from the server.

Posted: Fri Nov 01, 2013 10:06 am
by kgb2013
I have built an MRT file with the Designer and I use a parameter in a query that controls the number of results to be returned.
The query is sent to a remote server.

// Somewhere in the constructor.
report = new StiReport();
report.Load(MrtFile);
report["OldAgo"] = 1180; // Set the parameter.


public ActionResult GetReportSnapshot()
{
return StiMvcViewer.GetReportSnapshotResult(HttpContext, report);
}

public ActionResult ViewerEvent()
{
return StiMvcViewer.ViewerEventResult(HttpContext, report);
}

Now everything works great untill I enter a big number of results to be returned.
Then I get a "Error: Timeout response from the server." error.
This is an SQL Server DB and I have set the timeout in the connection string: "Connect Timeout=2147483647".
Also, the query seems to be executed successfully from the Designer.
Is there any setting in your library that needs to be set by code?

Thanks.

Re: Error: Timeout response from the server.

Posted: Fri Nov 01, 2013 12:08 pm
by Vladimir
Hello,

Please set a ClientRequestTimeout option for MvcViewer component, the value is set in seconds. The default is 20 seconds.

Thank you.

Re: Error: Timeout response from the server.

Posted: Fri Nov 01, 2013 12:38 pm
by kgb2013
Thanks!
Now it is solved! :)

Code: Select all

@Html.Stimulsoft().StiMvcViewer(
	"Reports",
	new StiMvcViewerOptions() {
		Controller = "Reports",
		ActionGetReportSnapshot = "GetReportSnapshot",
		ActionViewerEvent = "ViewerEvent",
		ActionExportReport = "ExportReport",
		ActionPrintReport = "PrintReport",
		Width = Unit.Percentage(100),
		BackColor = Color.DarkGray,
		ClientRequestTimeout = 9000, // <---------------
	}
)

Re: Error: Timeout response from the server.

Posted: Fri Nov 01, 2013 12:43 pm
by Vladimir
Hello,

We are always glad to help you!