After uploading several rdl files using c# program I get underlying connection closed error: an unexpected error occurred on a receive

Roman Gelfand 21 Reputation points
2020-08-07T04:39:59.61+00:00

I have written a c# program which uploads rdl files into report folder. I am using CreateCatalog class and CreateCatalogItem method to upload rdl file. This is done in a loop. I am reading os files and using CreateCatalogItem the files are uploaded.

This is one of the attributes
[System.Web.Services.WebServiceBindingAttribute(Name="ReportingService2010Soap", Namespace="http://schemas.microsoft.com/sqlserver/reporting/2010/03/01/ReportServer")]

Important thing to note is that this issue doesn't popup on the first upload. Some 40 or so out of 120 rdl files are uploaded successfully before hitting error underlying connection closed.

I looked at the ssrs log, but didn't see any errors. It listed all the files uploaded successfully.

This code worked successfully on 5 different machine/environments.

I have googled this but the answers seem to suggest the issue was from outset. In other words, it seems that if I would have hit that issue, I wouldn't be able to upload even one file. But this is not my case.

If somebody could point me to how to troubleshoot this.

Any help is appreciated.

SQL Server Reporting Services
SQL Server Reporting Services
A SQL Server technology that supports the creation, management, and delivery of both traditional, paper-oriented reports and interactive, web-based reports.
2,798 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Joyzhao-MSFT 15,566 Reputation points
    2020-08-07T05:59:01.2+00:00

    Hi,
    From my point of view, this is more likely a connection issue rather than ssrs issue. In SSRS there is not such settings could affect like this . I found some trouble shoot direction that may be helpful.

    This problem occurs when the server or another network device unexpectedly closes an existing Transmission Control Protocol (TCP) connection. This problem may occur when a time-out value on the server or on the network device is set too low.  The problem can also occur if the server resets the connection unexpectedly, such as if an unhandled exception crashes the server process. Analyze the server logs to see if this may be the issue.

    To resolve this problem, make sure that you are using the most recent version of the .NET Framework.

    Best Regards,
    Joy

    0 comments No comments

  2. Ayca Akcay 21 Reputation points
    2022-03-14T14:27:57.717+00:00

    Some firewalls consider multiple rdl deploy as brute force attack.

    0 comments No comments