问题描述
嗨我有这个错误"远程服务器返回了意外的响应400错误请求。"我有谷歌它和foudn我需要增加请求sizse我做但没有发生,(我试图发送对象到一个Wcf(如果对象有3行,其
工作正常)但4和+ er erro出现
hi i have this error "the remote server returned an unexpected response 400 bad request." i have google it and foudn that i need to increase the request sizse i did but nothing happend , ( iam trying to send object to a wcf ( if the object has 3 rows its works fine) but 4 and + ther erro appears
这里是mt app.config和wen.config
here is mt app.config and wen.config
App.config
App.config
<bindings>
<wsHttpBinding>
<binding name="WSHttpBinding_IService" closeTimeout="00:01:00"
openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00"
bypassProxyOnLocal="false" transactionFlow="false" hostNameComparisonMode="StrongWildcard"
maxBufferPoolSize="500000000" maxReceivedMessageSize="500000000" messageEncoding="Text"
textEncoding="utf-8" useDefaultWebProxy="true" allowCookies="false">
<readerQuotas maxDepth="500000000" maxStringContentLength="500000000" maxArrayLength="500000000"
maxBytesPerRead="500000000" maxNameTableCharCount="500000000" />
<reliableSession ordered="true" inactivityTimeout="00:10:00"
enabled="false" />
<security mode="Message">
<transport clientCredentialType="Windows" proxyCredentialType="None"
realm="" />
<message clientCredentialType="Windows" negotiateServiceCredential="true"
algorithmSuite="Default" />
</security>
</binding>
</wsHttpBinding>
</bindings>
<client>
<endpoint address="http://sami-laptop/AlHayatMedicalC/Service.svc"
binding="wsHttpBinding" bindingConfiguration="WSHttpBinding_IService"
contract="AlHayatMC.IService" name="WSHttpBinding_IService" >
<identity>
<dns value="localhost" />
</identity>
</endpoint>
</client>
推荐答案
例如: -
< services>
<services>
&NBSP; < service name =" DataService">
<service name="DataService">
&NBSP; &NBSP; < endpoint address =" http:// localhost:2881 / DataService.svc" &NBSP; &NBSP; &NBSP;
<endpoint address="http://localhost:2881/DataService.svc"
&NBSP; &NBSP; &NBSP;结合= QUOT;&的WebHttpBinding QUOT; bindingConfiguration =" higherMessageSize"
binding="webHttpBinding" bindingConfiguration="higherMessageSize"
&NBSP; &NBSP; &NBSP; contract =" System.Data.Services.IRequestHandler">
contract ="System.Data.Services.IRequestHandler">
&NBSP; &NBSP; < / endpoint>
</endpoint>
&NBSP; < / service>
</service>
< / services>
</services>
< bindings>
<bindings>
&NBSP; < webHttpBinding>
<webHttpBinding>
&NBSP; &NBSP; < binding name =" higherMessageSize" MAXBUFFERSIZE = QUOT; 50000000" maxReceivedMessageSize = QUOT; 50000000" />
<binding name="higherMessageSize" maxBufferSize="50000000" maxReceivedMessageSize="50000000" />
&NBSP; < / webHttpBinding>
</webHttpBinding>
< / bindings>
</bindings>
这篇关于错误:远程服务器返回意外响应400错误请求。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!