Error: Timeout response from the server.

Stimulsoft Reports.WEB discussion
Post Reply
kgb2013
Posts: 85
Joined: Fri Nov 01, 2013 9:52 am
Location: Earth

Error: Timeout response from the server.

Post 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.
Vladimir
Posts: 1462
Joined: Fri Apr 13, 2007 4:05 am
Location: Earth

Re: Error: Timeout response from the server.

Post by Vladimir »

Hello,

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

Thank you.
kgb2013
Posts: 85
Joined: Fri Nov 01, 2013 9:52 am
Location: Earth

Re: Error: Timeout response from the server.

Post 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, // <---------------
	}
)
Vladimir
Posts: 1462
Joined: Fri Apr 13, 2007 4:05 am
Location: Earth

Re: Error: Timeout response from the server.

Post by Vladimir »

Hello,

We are always glad to help you!
Post Reply