Search code examples
web-servicesreporting-servicesreportservice2010

ReportService2010.asmx ListChildren() Timeout exception


I have added a reference to SSRS web service in one of my exe - http://servername/ReportService2010.asmx

When a call is made to ListChildren() with Recursive = false as

var reportService = new ReportingService2010
{
    Credentials = CredentialCache.DefaultCredentials,
    Url = "http://servername/ReportService2010.asmx"
};

...

var children = reportService.ListChildren(parentFolderPath, false);

Following exception is thrown -

System.Net.WebException: The operation has timed out
   at System.Web.Services.Protocols.WebClientProtocol.GetWebResponse(WebRequest request)
   at System.Web.Services.Protocols.HttpWebClientProtocol.GetWebResponse(WebRequest request)
   at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)
   at DeploySSRSreports.ReportService2010.ReportingService2010.ListChildren(String ItemPath, Boolean Recursive)

Can please guide what could be the possible cause of this error?

FYI, Default value for reportService.Timeout is 100000 milliseconds, which is pretty reasonable to me.
Also, above code runs fine in DEV environment but is failing in QA.

Thank you!


Solution

  • The issue was happening because of slow running SSRS server. We ran the exe at a different time and issue was resolved.

    If you are facing same issue, you can solve this problem by -

    • Doing SSRS Server or associated windows service restart, if that is possible. In my case it was not possible because our SSRS server is also a database server catering to many other project databases.
    • Increasing the timeout for SSRS Service call. This will definitely resolve the issue.

    HTH.