Microsoft is giving away 50,000 FREE Microsoft Certification exam vouchers. Get Fabric certified for FREE! Learn more
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?
Solved! Go to Solution.
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.
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.
Check out the April 2025 Power BI update to learn about new features.
Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.
User | Count |
---|---|
3 | |
2 | |
2 | |
1 | |
1 |
User | Count |
---|---|
3 | |
2 | |
2 | |
2 | |
2 |