首页 > 解决方案 > InnerChannel = 'webServiceProxy.InnerChannel' 抛出异常

问题描述

我正在尝试为 SSRS 报告使用 WCF 服务。

我试图超过消息大小限制,但它给了我以下例外:

InnerChannel = 'webServiceProxy.InnerChannel' threw an exception of type 'System.ServiceModel.CommunicationObjectFaultedException'
Channel = 'webServiceProxy.Channel' threw an exception of type 'System.ServiceModel.CommunicationObjectFaultedException'

要在服务器端导出以使用 WCF 的代码..

尝试 {

                var webServiceProxy = new ReportExecutionServiceSoapClient(wcfEndpointConfigName);

// End Point Name is Coming here,写在 web Config 文件中:basicHttpEndpoint

                webServiceProxy.ClientCredentials.Windows.AllowedImpersonationLevel =
               System.Security.Principal.TokenImpersonationLevel.Impersonation;
                webServiceProxy.ClientCredentials.Windows.ClientCredential = clientCredentials;

                // Init Report to execute
                ServerInfoHeader serverInfoHeader;
                ExecutionInfo executionInfo;
                ExecutionHeader executionHeader = webServiceProxy.LoadReport(null, report, null,
                                                                             out serverInfoHeader, out executionInfo);

                // Attach Report Parameters
                webServiceProxy.SetExecutionParameters(executionHeader, null, parameters, null, out executionInfo);

                // Render
                serverInfoHeader =
                    webServiceProxy.Render(executionHeader, null, GetExportFormatString(format), null,
                                           out output, out extension, out mimeType, out encoding, out warnings,
                                           out streamIds);
            }
            catch (FaultException e)
            {

                throw new FaultException(e.Message);
            }

网页配置文件

  <system.serviceModel>
    <bindings>
      <basicHttpBinding>
        <binding name="ReportExecutionServiceSoap" receiveTimeout="05:00:00"
          sendTimeout="05:00:00" allowCookies="true" maxReceivedMessageSize="5242880">
          <security mode="TransportCredentialOnly">
            <transport clientCredentialType="Ntlm" proxyCredentialType="None"
              realm="" />
            <message clientCredentialType="UserName" algorithmSuite="Default" />
          </security>
        </binding>
      </basicHttpBinding>
    </bindings>
    <client>
      <endpoint address="http://../ReportServer/ReportExecution2005.asmx"
        binding="basicHttpBinding" bindingConfiguration="ReportExecutionServiceSoap"
        contract="MyServiceReference.ReportExecutionServiceSoap" name="basicHttpEndpoint" />
    </client>
  </system.serviceModel>

有人可以指导我在哪里做错了吗?我被困了好几天。

标签: c#asp.netreporting-servicesssrs-2008ssrs-2008-r2

解决方案


推荐阅读