欢迎来到Doc100.Net免费学习资源知识分享平台!
您的位置:首页 > 程序异常 >

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

更新时间: 2014-01-05 02:00:07 责任编辑: Author_N1

 

远程服务器返回了意外响应:(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>
上一篇:上一篇
下一篇:下一篇

 

随机推荐程序问答结果

 

 

如对文章有任何疑问请提交到问题反馈,或者您对内容不满意,请您反馈给我们DOC100.NET论坛发贴求解。
DOC100.NET资源网,机器学习分类整理更新日期::2014-01-05 02:00:07
如需转载,请注明文章出处和来源网址:http://www.doc100.net/bugs/t/4342/
本文WWW.DOC100.NET DOC100.NET版权所有。