There's a couple of things I see in your config files.
First, in your client config you have a <services>
section - unless your client is also hosting a service, you don't need that there. Additionally, your <services>
section is using wsHttpBinding
, but your client is specifying basicHttpBinding
- the client and service bindings need to match.
Second, you've set higher values for the binding on the client side, but the client side binding configuration has no effect on the server side. You don't have an explicit endpoint defined in your service config, so you're getting the default endpoint with default binding (basicHttpBinding
), which has the normal default values.
You can either add a default configuration for basicHttpBinding
in your service config (by omitting the name
attribute) like this:
<bindings>
<basicHttpBinding>
<binding closeTimeout="01:01:00"
openTimeout="01:01:00" receiveTimeout="01:10:00" sendTimeout="01:01: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="4096" maxNameTableCharCount="2147483647" />
<security mode="None">
<transport clientCredentialType="None" proxyCredentialType="None"
realm="" />
<message clientCredentialType="UserName" algorithmSuite="Default" />
</security>
</binding>
</basicHttpBinding>
</bindings>
This is the same definition from your client.config, minus the name
attribute. (Also, why do you have transport and message security defined but security mode set to "none"?).
Another option is to explicitly define an endpoint in your service config and specify a binding configuration to use. Similar to what you did in the client config file. Let's assume you have a basicHttpBinding
named "BasicHttpBinding_IService". Your endpoint would look something like this:
<services>
<service name="LocalService.Service" behaviorConfiguration="ServiceBehavior">
<endpoint address="http://localhost:20314/Service.svc"
binding="basicHttpBinding"
bindingConfiguration="BasicHttpBinding_IService"
contract="LocalService.IService" />
</service>
</services>