Hi All,
I have a problem to send large amount of data by WCF service.I found a error "The remote server returned an unexpected response: (400) Bad Request"
please anyone send a needful help.
My server side code:
<system.servicemodel>
<bindings>
<wshttpbinding>
<!--<binding name="WSHttpBinding_IService1" closetimeout="00:01:00">
openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00"
bypassProxyOnLocal="false" transactionFlow="false" hostNameComparisonMode="StrongWildcard"
maxBufferPoolSize="524288" maxReceivedMessageSize="65536" messageEncoding="Text"
textEncoding="utf-8" useDefaultWebProxy="true" allowCookies="false">
<readerquotas maxdepth="32" maxstringcontentlength="8192" maxarraylength="16384">
maxBytesPerRead="4096" maxNameTableCharCount="16384" />-->
<binding name="WSHttpBinding_IService1" closetimeout="00:10:00">
openTimeout="00:10:00" receiveTimeout="00:10:00" sendTimeout="00:10:00"
bypassProxyOnLocal="false" transactionFlow="false" hostNameComparisonMode="StrongWildcard"
maxBufferPoolSize="2147483647" maxReceivedMessageSize="2147483647"
messageEncoding="Text" textEncoding="utf-8" useDefaultWebProxy="true"
allowCookies="false">
<readerquotas maxdepth="2147483647" maxstringcontentlength="2147483647" maxarraylength="2147483647">
maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" />
<services>
<service name="WcfService.Service1" behaviorconfiguration="WcfService.Service1Behavior">
<!-- Service Endpoints -->
<endpoint address="" binding="wsHttpBinding" contract="WcfService.IService1">
<!--
Upon deployment, the following identity element should be removed or replaced to reflect the
identity under which the deployed service runs. If removed, WCF will infer an appropriate identity
automatically.
-->
<identity>
<dns value="localhost">
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange">
<behaviors>
<servicebehaviors>
<behavior name="WcfService.Service1Behavior">
<!-- To avoid disclosing metadata information, set the value below to false and remove the metadata endpoint above before deployment -->
<servicemetadata httpgetenabled="true">
<!-- To receive exception details in faults for debugging purposes, set the value below to true. Set to false before deployment to avoid disclosing exception information -->
<servicedebug includeexceptiondetailinfaults="false">
<system.webserver>
<modules runallmanagedmodulesforallrequests="true">
Client Side Code:
<system.servicemodel>
<bindings>
<wshttpbinding>
<binding name="WSHttpBinding_IService1" closetimeout="00:01:00">
openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00"
bypassProxyOnLocal="false" transactionFlow="false" hostNameComparisonMode="StrongWildcard"
maxBufferPoolSize="524288" maxReceivedMessageSize="65536" messageEncoding="Text"
textEncoding="utf-8" useDefaultWebProxy="true" allowCookies="false">
<readerquotas maxdepth="32" maxstringcontentlength="8192" maxarraylength="16384">
maxBytesPerRead="4096" maxNameTableCharCount="16384" />
<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" />
<client>
<endpoint address="http://localhost:51470/Service1.svc" binding="wsHttpBinding">
bindingConfiguration="WSHttpBinding_IService1" contract="ServiceRefe_WCF.IService1"
name="WSHttpBinding_IService1">
<identity>
<dns value="localhost">
<behaviors>
<servicebehaviors>
<behavior>
<!-- To avoid disclosing metadata information, set the value below to false and remove the metadata endpoint above before deployment -->
<servicemetadata httpgetenabled="true">
<!-- To receive exception details in faults for debugging purposes, set the value below to true. Set to false before deployment to avoid disclosing exception information -->
<servicedebug includeexceptiondetailinfaults="false">
<servicehostingenvironment multiplesitebindingsenabled="true">
Thanks & Regards
Ram Kumar