I am trying to generate an excel report from my application using SQL Server Reporting Service and getting an unexpected error. When I look at the log file for the SQL Server reporting service I see the below error -

Level: Error | DateTime: 2020-10-05 16:40:28.7174 | ThreadId: 7 | Message: The underlying connection was closed: The connection was closed unexpectedly. | Exception: System.ApplicationException: Failed to execute report ---> System.ServiceModel.CommunicationException: The underlying connection was closed: The connection was closed unexpectedly. ---> System.Net.WebException: The underlying connection was closed: The connection was closed unexpectedly. at System.Net.HttpWebRequest.GetResponse() at System.ServiceModel.Channels.HttpChannelFactory`1.HttpRequestChannel.HttpChannelRequest.WaitForReply(TimeSpan timeout) --- End of inner exception stack trace ---

Server stack trace: at System.ServiceModel.Channels.HttpChannelUtilities.ProcessGetResponseWebException(WebException webException, HttpWebRequest request, HttpAbortReason abortReason) at System.ServiceModel.Channels.HttpChannelFactory`1.HttpRequestChannel.HttpChannelRequest.WaitForReply(TimeSpan timeout) at System.ServiceModel.Channels.RequestChannel.Request(Message message, TimeSpan timeout) at System.ServiceModel.Dispatcher.RequestChannelBinder.Request(Message message, TimeSpan timeout) at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout) at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation) at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)

Exception rethrown at [0]: at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg) at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type) at GraphiteGTC.Reporting.SqlServer.Core.ServiceReference.ReportExecutionServiceSoap.LoadReport(LoadReportRequest request) at GraphiteGTC.Reporting.SqlServer.Core.ServiceReference.ReportExecutionServiceSoapClient.GraphiteGTC.Reporting.SqlServer.Core.ServiceReference.ReportExecutionServiceSoap.LoadReport(LoadReportRequest request) in C:\GTC\Content\GraphiteGTC\Traditional\SqlServerReportingService\Feature\6.3.0\Source\Reporting.SqlServer.Core\Service References\ServiceReference\Reference.cs:line 3240 at GraphiteGTC.Reporting.SqlServer.Core.ServiceReference.ReportExecutionServiceSoapClient.LoadReport(TrustedUserHeader TrustedUserHeader, String Report, String HistoryID, ServerInfoHeader& ServerInfoHeader, ExecutionInfo& executionInfo) in C:\GTC\Content\GraphiteGTC\Traditional\SqlServerReportingService\Feature\6.3.0\Source\Reporting.SqlServer.Core\Service References\ServiceReference\Reference.cs:line 3248 at GraphiteGTC.Reporting.SqlServer.Core.Implementation.ReportEngineWrapper.ExecuteReport(ReportDetail reportDetail) in C:\GTC\Content\GraphiteGTC\Traditional\SqlServerReportingService\Feature\6.3.0\Source\Reporting.SqlServer.Core\Implementation\ReportEngineWrapper.cs:line 30 at GraphiteGTC.Reporting.SqlServer.Core.Service.SqlServerReporting.ExecuteReport(ReportDetail ReportDetail) in C:\GTC\Content\GraphiteGTC\Traditional\SqlServerReportingService\Feature\6.3.0\Source\Reporting.SqlServer.Core\Service\SqlServerReporting.cs:line 12 --- End of inner exception stack trace --- System.ServiceModel.CommunicationException: The underlying connection was closed: The connection was closed unexpectedly. ---> System.Net.WebException: The underlying connection was closed: The connection was closed unexpectedly. at System.Net.HttpWebRequest.GetResponse() at System.ServiceModel.Channels.HttpChannelFactory`1.HttpRequestChannel.HttpChannelRequest.WaitForReply(TimeSpan timeout) --- End of inner exception stack trace ---

Server stack trace: at System.ServiceModel.Channels.HttpChannelUtilities.ProcessGetResponseWebException(WebException webException, HttpWebRequest request, HttpAbortReason abortReason) at System.ServiceModel.Channels.HttpChannelFactory`1.HttpRequestChannel.HttpChannelRequest.WaitForReply(TimeSpan timeout) at System.ServiceModel.Channels.RequestChannel.Request(Message message, TimeSpan timeout) at System.ServiceModel.Dispatcher.RequestChannelBinder.Request(Message message, TimeSpan timeout) at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout) at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation) at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)

Exception rethrown at [0]: at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg) at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type) at GraphiteGTC.Reporting.SqlServer.Core.ServiceReference.ReportExecutionServiceSoap.LoadReport(LoadReportRequest request) at GraphiteGTC.Reporting.SqlServer.Core.ServiceReference.ReportExecutionServiceSoapClient.GraphiteGTC.Reporting.SqlServer.Core.ServiceReference.ReportExecutionServiceSoap.LoadReport(LoadReportRequest request) in C:\GTC\Content\GraphiteGTC\Traditional\SqlServerReportingService\Feature\6.3.0\Source\Reporting.SqlServer.Core\Service References\ServiceReference\Reference.cs:line 3240 at GraphiteGTC.Reporting.SqlServer.Core.ServiceReference.ReportExecutionServiceSoapClient.LoadReport(TrustedUserHeader TrustedUserHeader, String Report, String HistoryID, ServerInfoHeader& ServerInfoHeader, ExecutionInfo& executionInfo) in C:\GTC\Content\GraphiteGTC\Traditional\SqlServerReportingService\Feature\6.3.0\Source\Reporting.SqlServer.Core\Service References\ServiceReference\Reference.cs:line 3248 at GraphiteGTC.Reporting.SqlServer.Core.Implementation.ReportEngineWrapper.ExecuteReport(ReportDetail reportDetail) in C:\GTC\Content\GraphiteGTC\Traditional\SqlServerReportingService\Feature\6.3.0\Source\Reporting.SqlServer.Core\Implementation\ReportEngineWrapper.cs:line 30 at GraphiteGTC.Reporting.SqlServer.Core.Service.SqlServerReporting.ExecuteReport(ReportDetail ReportDetail) in C:\GTC\Content\GraphiteGTC\Traditional\SqlServerReportingService\Feature\6.3.0\Source\Reporting.SqlServer.Core\Service\SqlServerReporting.cs:line 12 System.Net.WebException: The underlying connection was closed: The connection was closed unexpectedly. at System.Net.HttpWebRequest.GetResponse() at System.ServiceModel.Channels.HttpChannelFactory`1.HttpRequestChannel.HttpChannelRequest.WaitForReply(TimeSpan timeout)

asked 05 Oct, 20:42

Nitin%20Chhabra's gravatar image

Nitin Chhabra
101222529
accept rate: 33%

edited 05 Oct, 21:03


Looks like you didn't update the endpoint address in the GraphiteGTC Reporting SQL Server Service configuration file. The endpoint address should be updated to the URL of the Microsoft SQL Server Reporting server you are trying to connect to.

Following is the sample configuration entry -
<endpoint address="http://win2019-nitinc:80/ReportServer/ReportExecution2005.asmx" binding="basicHttpBinding" bindingconfiguration="ReportExecutionServiceSoap" contract="ServiceReference.ReportExecutionServiceSoap" name="ReportExecutionServiceSoap"/>

Update the endpoint address, restart your windows service and try again.

link

answered 05 Oct, 20:56

Nitin%20Chhabra's gravatar image

Nitin Chhabra
101222529
accept rate: 33%

edited 05 Oct, 20:59

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×4
×3
×1

Asked: 05 Oct, 20:42

Seen: 59 times

Last updated: 05 Oct, 21:03

Powered By:   Graphite