Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Next up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now

Reply
JagadishNallami
Frequent Visitor

Underlying connection was closed error in SSRS when accessing a report

Hi There,

 

I am using SSRS reports in my Windows application using Report viewer in Winforms. I am getting the below exception while trying to get the report.

 

Exception message: The underlying connection was closed: The connection was closed unexpectedly.
Stack trace: at System.Web.Services.Protocols.WebClientProtocol.GetWebResponse(WebRequest request)
at System.Web.Services.Protocols.HttpWebClientProtocol.GetWebResponse(WebRequest request)
at Microsoft.Reporting.WinForms.Internal.Soap.ReportingServices2005.Execution.RSExecutionConnection.GetWebResponse(WebRequest request)
at Microsoft.Reporting.WinForms.ServerReportSoapProxy.GetWebResponse(WebRequest request)
at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)
at Microsoft.Reporting.WinForms.Internal.Soap.ReportingServices2005.Execution.ReportExecutionService.LoadDrillthroughTarget2(String DrillthroughID)
at Microsoft.Reporting.WinForms.Internal.Soap.ReportingServices2005.Execution.RSExecutionConnection.<>c__DisplayClass1e.<LoadDrillthroughTarget>b__1c()
at Microsoft.Reporting.WinForms.Internal.Soap.ReportingServices2005.Execution.RSExecutionConnection.ProxyMethodInvocation.Execute[TReturn](RSExecutionConnection connection, ProxyMethod`1 initialMethod, ProxyMethod`1 retryMethod)
at Microsoft.Reporting.WinForms.Internal.Soap.ReportingServices2005.Execution.RSExecutionConnection.LoadDrillthroughTarget(String DrillthroughID)
at Microsoft.Reporting.WinForms.ServerReport.PerformDrillthrough(String drillthroughId, String& reportPath)
at Microsoft.Reporting.WinForms.ReportViewer.RenderDrillthrough(DrillthroughAction action)
at Microsoft.Reporting.WinForms.ReportViewer.FireAnAction(Action action, Boolean shiftKeyDown)

 

However, when I checked my SSRS server logs , I didn't see any errors. 

 

What could be the possible reason for this error? Is this could be due to the issue with report viewer? Any properties I need to set?

1 ACCEPTED SOLUTION
AmiraBedh
Super User
Super User

I think there are some network issues between your client machine and your SSRS server. You can use tools like ping or tracert to diagnose network connectivity problems.

If your SSRS server is configured to use HTTPS, the client should be the correct TLS/SSL version. Older versions of the .NET Framework may not support newer TLS versions by default. You can enforce the use of a specific TLS version in your application by adding the following code:

System.Net.ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;

Genreally, if the SSRS server is under heavy load or running out of memory, it might close connections unexpectedly. 


Proud to be a Power BI Super User !

Microsoft Community : https://docs.microsoft.com/en-us/users/AmiraBedhiafi
Linkedin : https://www.linkedin.com/in/amira-bedhiafi/
StackOverflow : https://stackoverflow.com/users/9517769/amira-bedhiafi
C-Sharp Corner : https://www.c-sharpcorner.com/members/amira-bedhiafi
Power BI Community :https://community.powerbi.com/t5/user/viewprofilepage/user-id/332696

View solution in original post

1 REPLY 1
AmiraBedh
Super User
Super User

I think there are some network issues between your client machine and your SSRS server. You can use tools like ping or tracert to diagnose network connectivity problems.

If your SSRS server is configured to use HTTPS, the client should be the correct TLS/SSL version. Older versions of the .NET Framework may not support newer TLS versions by default. You can enforce the use of a specific TLS version in your application by adding the following code:

System.Net.ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;

Genreally, if the SSRS server is under heavy load or running out of memory, it might close connections unexpectedly. 


Proud to be a Power BI Super User !

Microsoft Community : https://docs.microsoft.com/en-us/users/AmiraBedhiafi
Linkedin : https://www.linkedin.com/in/amira-bedhiafi/
StackOverflow : https://stackoverflow.com/users/9517769/amira-bedhiafi
C-Sharp Corner : https://www.c-sharpcorner.com/members/amira-bedhiafi
Power BI Community :https://community.powerbi.com/t5/user/viewprofilepage/user-id/332696

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

FabCon and SQLCon Highlights Carousel

FabCon &SQLCon Highlights

Experience the highlights from FabCon & SQLCon, available live and on-demand starting April 14th.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.