Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/.net/24.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
.NET客户端通过服务引用访问服务时出错_.net_Wcf - Fatal编程技术网

.NET客户端通过服务引用访问服务时出错

.NET客户端通过服务引用访问服务时出错,.net,wcf,.net,Wcf,我试图通过.Net客户端应用程序中的服务引用访问服务。 当我访问服务方法时,我得到以下错误: 访问服务方法时捕获异常 从中捕获System.Xml.XmlException消息=结束元素“Body” 名称空间'http://schemas.xmlsoap.org/soap/envelope/”他说。建立 命名空间中的元素“ns:updateStatusAsReadResponse” 我的app.config如下所示: <bindings> <basicHttpBinding

我试图通过.Net客户端应用程序中的服务引用访问服务。 当我访问服务方法时,我得到以下错误:

访问服务方法时捕获异常

从中捕获System.Xml.XmlException消息=结束元素“Body” 名称空间'http://schemas.xmlsoap.org/soap/envelope/”他说。建立 命名空间中的元素“ns:updateStatusAsReadResponse”

我的app.config如下所示:

<bindings>
  <basicHttpBinding>
      <binding name="documentproxySoap11Binding" closeTimeout="00:01:00"
             openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00"
             allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard"
             maxBufferSize="65536" maxBufferPoolSize="524288" maxReceivedMessageSize="65536"
             messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered"
             useDefaultWebProxy="true">
      <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"
          maxBytesPerRead="4096" maxNameTableCharCount="16384" />
      <security mode="None">
        <transport clientCredentialType="None" proxyCredentialType="None"
            realm="" />
        <message clientCredentialType="UserName" algorithmSuite="Default" />
      </security>
    </binding>

  </basicHttpBinding>
  <customBinding>
         <binding name="documentproxySoap12Binding">
      <textMessageEncoding maxReadPoolSize="64" maxWritePoolSize="16"
          messageVersion="Soap12" writeEncoding="utf-8">
        <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"
            maxBytesPerRead="4096" maxNameTableCharCount="16384" />
      </textMessageEncoding>
      <security authenticationMode="MutualCertificate" >
      </security>
      <httpTransport manualAddressing="false" maxBufferPoolSize="524288"
          maxReceivedMessageSize="65536" allowCookies="false" authenticationScheme="Anonymous"
          bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard"
          keepAliveEnabled="true" maxBufferSize="65536" proxyAuthenticationScheme="Anonymous"
          realm="" transferMode="Buffered" unsafeConnectionNtlmAuthentication="false"
          useDefaultWebProxy="true" />
    </binding>
  </customeBinding>
  <client>
        <endpoint address="http://xxx.documentproxyHttpSoap11Endpoint/"
             binding="basicHttpBinding" bindingConfiguration="documentproxySoap11Binding"
             contract="documentProxy.documentproxyPortType" name="documentproxyHttpSoap11Endpoint" />

  </client>

你能把你的客户端调用服务的代码和你的客户端配置贴出来吗?我的客户端通过服务引用访问服务。所以它会自动创建一个类。我正在使用class方法。DocumentProxy测试=新DocumentProxy;更新状态试验;maxBytesPerRead=4096 maxNameTableCharCount=16384/>