zoukankan      html  css  js  c++  java
  • asp.net 连php soap 出了一个怪问题

    这几天,在写一下asp.net 连php soap   的系统,出了一个很怪的问题,至少对于第一次连soap来是相当怪

    请求的时候,时不时的抛出

    System.ServiceModel.CommunicationException: 服务器提交了协议冲突. Section=ResponseStatusLine ---> System.Net.WebException: 服务器提交了协议冲突. Section=ResponseStatusLine

    在 System.Net.HttpWebRequest.GetResponse()
       在 System.ServiceModel.Channels.HttpChannelFactory.HttpRequestChannel.HttpChannelRequest.WaitForReply(TimeSpan timeout)
       --- 内部异常堆栈跟踪的结尾 ---

    偶尔有的时候不会。在网上看到别人说,在webconfig里添加:

    <system.net>
    <settings>
    <httpWebRequest useUnsafeHeaderParsing="true" />
    </settings>
    </system.net>

    就不会了,但我加进去,问题依然存在,所以今天拿出来请教大家,这到底是什么问题,已经让我困惑了几天了,下面是我连soap web.config里的配置

      <system.serviceModel>
        <bindings>
          <basicHttpBinding>
            <binding name="serverBinding" closeTimeout="00:01:00" openTimeout="00:01:00"
              receiveTimeout="00:01:00" sendTimeout="00:01:00" allowCookies="false"
              bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard"
              maxBufferSize="65536000" maxBufferPoolSize="524288000" maxReceivedMessageSize="65536000"
              messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered"
              useDefaultWebProxy="false">
              <readerQuotas maxDepth="32" maxStringContentLength="81920000"
                maxArrayLength="163840000" maxBytesPerRead="40960000" maxNameTableCharCount="163840000" />
              <security mode="None">
                <transport clientCredentialType="None" proxyCredentialType="None"
                  realm="string" />
                <message clientCredentialType="UserName" algorithmSuite="Default" />
              </security>
            </binding>
          </basicHttpBinding>
        </bindings>
        <client>
          <endpoint address="http://192.168.1.200/php/soapServer.php" binding="basicHttpBinding"
            bindingConfiguration="serverBinding" contract="BasketService.serverPortType"
            name="serverPort" />
        </client>
      </system.serviceModel>

    这是配置web.config里的,希望大家多多指教。

  • 相关阅读:
    c# web开发
    向wp8开发进军
    练毛笔字的心得
    刚开通博客园
    DevExpress Asp.net(3) ASPxCallback组件
    DevExpress Asp.net(2) ASPxObjectContainer说明
    DevExpress Asp.net(1) ASPxButton的基本使用
    JavaMail学习笔记(四)、使用POP3协议接收并解析电子邮件(全)
    Java正则表达式(一)、抓取网页email地址实例
    JavaMail学习笔记(五)、使用IMAP协议接收并解析电子邮件
  • 原文地址:https://www.cnblogs.com/jwhal/p/3083495.html
Copyright © 2011-2022 走看看