I have a wpf application which is sending a DataSet
with almost 25 DataTable
. I am not able to fix The remote server returned an unexpected response: (400) Bad Request
with synchronous and asynchronous both. Below is the app.config:
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<system.serviceModel>
<bindings>
<basicHttpBinding>
<binding name="BasicHttpBinding_ICommunication" closeTimeout="00:01:00"
openTimeout="00:01:00" receiveTimeout="01:00:00" sendTimeout="01:00:00"
allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard"
maxBufferSize="2147483647" maxBufferPoolSize="2147483647" maxReceivedMessageSize="2147483647"
messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered"
useDefaultWebProxy="true">
<readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647" maxArrayLength="2147483647"
maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" />
<security mode="None">
<transport clientCredentialType="None" proxyCredentialType="None"
realm="" />
<message clientCredentialType="UserName" algorithmSuite="Default" />
</security>
</binding>
</basicHttpBinding>
</bindings>
<client>
<endpoint address="http://localhost:49486/Communication.svc"
binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_ICommunication"
contract="CommunicationReference.ICommunication" name="BasicHttpBinding_ICommunication" />
</client>
</system.serviceModel>
</configuration>
and this is the Service's web.config:
<?xml version="1.0"?>
<configuration>
<system.web>
<compilation debug="true" targetFramework="4.0" />
<httpRuntime maxRequestLength="2147483647" executionTimeout="10000"/>
</system.web>
<connectionStrings>
<add name="conName" connectionString="Data Source=*******;Initial Catalog=****; User ID=**; Password=*****"/>
</connectionStrings>
<system.serviceModel>
<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"/>
<serviceThrottling maxConcurrentCalls="100" maxConcurrentSessions="1000" maxConcurrentInstances="1600" />
</behavior>
</serviceBehaviors>
</behaviors>
<serviceHostingEnvironment multipleSiteBindingsEnabled="true" />
</system.serviceModel>
<system.webServer>
<modules runAllManagedModulesForAllRequests="true"/>
</system.webServer>
</configuration>
P.S.: I tested it with passing blank DataSet
, Its working. But DataSet
with DataTable
its not working.