我有一个使用 SOAP 运行报告服务报告的 MVC3 网站,然后将其返回给浏览器。用户在他们的机器上安装了 IE8,所有报告都运行良好,除了一个抛出错误的特定报告。该报告采用 3 个参数并返回一个小于 10 行的表。仅当行数大于 0 时,它才会在 IE8 中引发错误。如果行数 = 0,那么它将返回仅包含标题的报告。该报告在 ReportManager 和 FireFox 中运行良好。我已经搜索了网络和 StackOverflow 寻找没有成功的答案。问题是我不能 100% 确定这是 SOAP 还是 SSRS 问题,甚至是其他问题,并希望得到一些指导。
IE8 错误
System.ServiceModel.FaultException: An internal error occurred on the report server. See the error log for more details. ---> Microsoft.ReportingServices.Diagnostics.Utilities.InternalCatalogException: An internal error occurred on the report server. See the error log for more details. ---> System.Exception: For more information about this error navigate to the report server on the local server machine, or enable remote errors
Server stack trace:
at System.ServiceModel.Channels.ServiceChannel.HandleReply(ProxyOperationRuntime operation, ProxyRpc& rpc)
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 Grj.Rail.Services.Reporting.ReportExecutionServiceSoap.LoadReport(LoadReportRequest request)
at Grj.Rail.Services.Reporting.ReportExecutionServiceSoapClient.LoadReport(TrustedUserHeader TrustedUserHeader, String Report, String HistoryID, ServerInfoHeader& ServerInfoHeader, ExecutionInfo& executionInfo) in C:\VS Projects\Grj\Source Code\Rail\Source\trunk\Grj.Rail.Services\Service References\Reporting\Reference.cs:line 3248
at Grj.Rail.Services.Impl.ReportService.InnerGetReport(String report, ParameterValue[] parameters, Byte[]& output, String& extension, String& mimeType, String& encoding, Warning[]& warnings, String[]& streamIds, String format) in C:\VS Projects\Grj\Source Code\Rail\Source\trunk\Grj.Rail.Services\Impl\ReportService.cs:line 86
at Grj.Rail.Services.Impl.ReportService.GetReport(String report, ReportTypes reportType, IDictionary`2 parameters) in C:\VS Projects\Grj\Source Code\Rail\Source\trunk\Grj.Rail.Services\Impl\ReportService.cs:line 72
at Grj.Rail.Services.Impl.ReportService.GetDayPlanReport(Int32 ticketOrderId, String dayPlanDate) in C:\VS Projects\Grj\Source Code\Rail\Source\trunk\Grj.Rail.Services\Impl\ReportService.cs:line 138
at Grj.Rail.Controllers.TicketOrderController.DayPlan(Int32 ticketOrderId) in C:\VS Projects\Grj\Source Code\Rail\Source\trunk\Grj.Rail\Controllers\TicketOrderController.cs:line 628
at lambda_method(Closure , ControllerBase , Object[] )
at System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext, IDictionary`2 parameters)
at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary`2 parameters)
at System.Web.Mvc.ControllerActionInvoker.<>c__DisplayClass15.<InvokeActionMethodWithFilters>b__12()
at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodFilter(IActionFilter filter, ActionExecutingContext preContext, Func`1 continuation)
at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodFilter(IActionFilter filter, ActionExecutingContext preContext, Func`1 continuation)
at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodFilter(IActionFilter filter, ActionExecutingContext preContext, Func`1 continuation)
at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodFilter(IActionFilter filter, ActionExecutingContext preContext, Func`1 continuation)
at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodWithFilters(ControllerContext controllerContext, IList`1 filters, ActionDescriptor actionDescriptor, IDictionary`2 parameters)
at System.Web.Mvc.ControllerActionInvoker.InvokeAction(ControllerContext controllerContext, String actionName)
SSRS 错误日志
library!ReportServer_0-105!2268!06/25/2013-13:18:45:: e ERROR: Throwing Microsoft.ReportingServices.Diagnostics.Utilities.InternalCatalogException: , Microsoft.ReportingServices.Diagnostics.Utilities.InternalCatalogException: An internal error occurred on the report server. See the error log for more details. ---> System.OutOfMemoryException: Exception of type 'System.OutOfMemoryException' was thrown.
at System.String.GetStringForStringBuilder(String value, Int32 startIndex, Int32 length, Int32 capacity)
at System.Text.StringBuilder.GetNewString(String currentString, Int32 requiredLength)
at System.Text.StringBuilder.Append(String value)
at System.IO.StringWriter.Write(String value)
at System.Xml.XmlTextEncoder.Write(String text)
at System.Xml.XmlTextWriter.WriteString(String text)
at Microsoft.ReportingServices.ReportProcessing.ParameterInfo.WriteValueToXml(XmlTextWriter xml, Object val)
at Microsoft.ReportingServices.ReportProcessing.ParameterInfo.WriteToXml(XmlTextWriter xml, Boolean writeTransientState)
at Microsoft.ReportingServices.ReportProcessing.ParameterInfoCollection.ToXml(Boolean usedInQueryValuesOnly, Boolean writeTransientState, Boolean convertToString)
at Microsoft.ReportingServices.ReportProcessing.ParameterInfoCollection.ToXml(Boolean usedInQueryValuesOnly)
at Microsoft.ReportingServices.Library.ReportItem.get_EffectiveParamsXml()
at Microsoft.ReportingServices.Library.DatabaseSessionStorage.AddNewSession(SessionReportItem sessionReport)
at Microsoft.ReportingServices.Library.CreateNewSessionAction.Save()
--- End of inner exception stack trace ---;
网络配置
<system.serviceModel>
<bindings>
<basicHttpBinding>
<binding name="ReportExecutionServiceSoap" maxReceivedMessageSize="5242880">
<security mode="TransportCredentialOnly">
<transport clientCredentialType="Ntlm" />
</security>
</binding>
</basicHttpBinding>
</bindings>
<client>
<endpoint address="http://grj-report01:80/ReportServer/ReportExecution2005.asmx"
binding="basicHttpBinding"
bindingConfiguration="ReportExecutionServiceSoap"
contract="Reporting.ReportExecutionServiceSoap"
name="ReportExecutionServiceSoap" />
</client>
</system.serviceModel>
报告服务
using (var reportingServices = new Reporting.ReportExecutionServiceSoapClient("ReportExecutionServiceSoap"))
{
System.Net.NetworkCredential clientCredentials = new System.Net.NetworkCredential(railConfig.ReportingServicesUserName, railConfig.ReportingServicesPassword);
reportingServices.ClientCredentials.Windows.AllowedImpersonationLevel = System.Security.Principal.TokenImpersonationLevel.Impersonation;
reportingServices.ClientCredentials.Windows.ClientCredential = clientCredentials;
reportingServices.ClientCredentials.Windows.AllowNtlm = true;
ServerInfoHeader serverInfoHeader;
ExecutionInfo executionInfo;
ExecutionHeader executionHeader = reportingServices.LoadReport(null, report, null, out serverInfoHeader, out executionInfo);
if (parameters != null && parameters.Any())
{
reportingServices.SetExecutionParameters(executionHeader, null, parameters, null, out executionInfo);
}
reportingServices.Render(executionHeader, null, format, null, out output, out extension, out mimeType, out encoding, out warnings, out streamIds);
}