首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > Web Service >

远程服务器回来了意外响应:(400)Bad Request。求解!

2013-04-05 
远程服务器返回了意外响应:(400)Bad Request。求解!!!访问WCF传递一个byte[]变量,如果值过大(13520字节)就

远程服务器返回了意外响应:(400)Bad Request。求解!!!
访问WCF传递一个byte[]变量,如果值过大(13520字节)就报上面的错误,如果传递小一点的值(比如8751字节)就OK,按网上大家说的方法修改maxBufferSize的值也没用,具体配置文件相关章节内容如下:
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
    <system.serviceModel>
        <bindings>
            <basicHttpBinding>
                <binding name="BasicHttpBinding_IConfigMngWcfService" closeTimeout="00:01:00"
                    openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00"
                    allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard"
                    maxBufferSize="2147483647" maxBufferPoolSize="5242880000"
                    maxReceivedMessageSize="2147483647" messageEncoding="Text"
                    textEncoding="utf-8" transferMode="Buffered" useDefaultWebProxy="true">
                    <readerQuotas maxDepth="32" maxStringContentLength="819200"
                        maxArrayLength="1638400" maxBytesPerRead="409600" maxNameTableCharCount="1638400" />
                    <security mode="None">
                        <transport clientCredentialType="None" proxyCredentialType="None"
                            realm="" />
                        <message clientCredentialType="UserName" algorithmSuite="Default" />
                    </security>
                </binding>
            </basicHttpBinding>
        </bindings>
        <client>
            <endpoint address="http://localhost:6650/ShopLink/ConfigMngWcfService.svc"
                binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_IConfigMngWcfService"
                contract="ConfigMngWcfService.IConfigMngWcfService" name="BasicHttpBinding_IConfigMngWcfService" />
        </client>


    </system.serviceModel>
</configuration>
服务器端的也做了相应修改,但问题依旧,不知为何?
[解决办法]
客户端服务端都修改

热点排行