.net 如何集成httpRuntime maxRequestLength=";8096“;进入app.config[Webservices]

.net 如何集成httpRuntime maxRequestLength=";8096“;进入app.config[Webservices],.net,web-services,.net,Web Services,我有一个等待xml到达的Web服务。今天我们注意到,XML有时似乎太大了。现在我想将添加到我的app.config中。不幸的是,它似乎没有任何效果。。。这是我的app.config: <?xml version="1.0" encoding="utf-8" ?> <configuration> <system.web> <httpRuntime maxRequestLength="10096" useFullyQualifie

我有一个等待xml到达的Web服务。今天我们注意到,XML有时似乎太大了。现在我想将
添加到我的app.config中。不幸的是,它似乎没有任何效果。。。这是我的app.config:

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
  <system.web>
    <httpRuntime maxRequestLength="10096"
        useFullyQualifiedRedirectUrl="true"
        executionTimeout="120"/>
  </system.web>

  <system.serviceModel>
    <client />
    <standardEndpoints />
    <services>
      <service behaviorConfiguration="metadataSupport" name="iib.wohnpreis.wohnpreisserver">
        <host>
          <baseAddresses>
            <add baseAddress="URLToWebservice" />
          </baseAddresses>
        </host>
      </service>
    </services>

    <bindings>
      <basicHttpBinding>
        <binding name="basicHttpBinding" transferMode="Buffered" useDefaultWebProxy="false">
          <readerQuotas maxStringContentLength="2147483647" />
        </binding>
      </basicHttpBinding>
    </bindings>
    <behaviors>
      <serviceBehaviors>
        <behavior name="metadataSupport">
          <serviceMetadata httpGetEnabled="true" httpGetUrl="wohnpreis/mex" />
          <serviceDebug includeExceptionDetailInFaults="true" />
        </behavior>
      </serviceBehaviors>
    </behaviors>
  </system.serviceModel>
</configuration>

有什么建议吗?出了什么问题? 谢谢你试图帮助我


Steffi遇到了问题。服务器告诉客户机maxStringContentLength被限制为8096-这不是真的,因为我们用

<bindings>
  <basicHttpBinding>
    <binding name="basicHttpBinding" transferMode="Buffered" useDefaultWebProxy="false">
      <readerQuotas maxStringContentLength="2147483647" />
    </binding>
  </basicHttpBinding>
</bindings>

不知道名称是如何干扰配置的-但如果没有名称,它可以正常工作…

什么是“似乎太大”的意思?你有什么错误?您是如何托管的?太大意味着文件大小超过8kb-如果我们切断xml以匹配较小的文件大小,服务将获得xml。如果没有,服务将无法接通。真正的错误没有出现。只有这种行为。我们公司的网络服务是在一台个人电脑上提供的。到目前为止,我们还没有遇到任何问题。似乎这不是我们网站服务的问题。。。我们有一家外国公司,它提供用PHP编写的客户端。此客户端正在发送XML。如果XML小于8kb,一切正常。>8kb就像没有任何东西发送到Web服务。可能是他们错误地配置了脚本吗?
<bindings>
  <basicHttpBinding>
    <binding transferMode="Buffered" useDefaultWebProxy="false">
      <readerQuotas maxStringContentLength="2147483647" />
    </binding>
  </basicHttpBinding>
</bindings>