This thread is related my my another thread:
[
^]
In my project, the web.config likes that below:
="1.0"
<configuration>
<appSettings>
...
</appSettings>
<system.web>
<compilation debug="true" targetFramework="4.0" />
</system.web>
<system.serviceModel>
<bindings>
<basicHttpBinding>
<binding name="BasicHttpBinding_ITransInfo" maxBufferPoolSize="2147483647"
maxBufferSize="2147483647" maxReceivedMessageSize="2147483647" />
<binding name="BasicHttpBinding_ITransInfoJson" maxBufferPoolSize="2147483647"
maxBufferSize="2147483647" maxReceivedMessageSize="2147483647" />
</basicHttpBinding>
</bindings>
<client>
<endpoint address="http://xxx.com/WSMonument/TransInfo.svc.svc" binding="basicHttpBinding"
bindingConfiguration="BasicHttpBinding_ITransInfo" contract="ITransInfo"
name="BasicHttpBinding_ITransInfo" />
<endpoint address="http://xxx.com/WSMonument/TransInfo.svc.svc" binding="basicHttpBinding"
bindingConfiguration="BasicHttpBinding_ITransInfoJson" contract="ITransInfoJson"
name="BasicHttpBinding_ITransInfoJson" />
</client>
<behaviors>
<serviceBehaviors>
<behavior>
<serviceMetadata httpGetEnabled="true"/>
<serviceDebug includeExceptionDetailInFaults="false"/>
</behavior>
</serviceBehaviors>
</behaviors>
<serviceHostingEnvironment multipleSiteBindingsEnabled="true" />
</system.serviceModel>
<system.webServer>
<modules runAllManagedModulesForAllRequests="true"/>
</system.webServer>
How wen I debug, the Client.dll.config throut WCF Test Client's Config Files shows the content below:
<system.serviceModel>
<bindings>
<basicHttpBinding>
<binding name="BasicHttpBinding_ITransInfo" />
<binding name="BasicHttpBinding_ITransInfoJson" />
</basicHttpBinding>
</bindings>
<client>
<endpoint address="http://localhost:35104/TransInfo.svc" binding="basicHttpBinding"
bindingConfiguration="BasicHttpBinding_ITransInfo" contract="ITransInfo"
name="BasicHttpBinding_ITransInfo" />
<endpoint address="http://localhost:35104/TransInfo.svc" binding="basicHttpBinding"
bindingConfiguration="BasicHttpBinding_ITransInfoJson" contract="ITransInfoJson"
name="BasicHttpBinding_ITransInfoJson" />
</client>
</system.serviceModel>
This one does NOT define the max. message size. When running the debugging, it picks up the default max. message size: 65536, and the endpoint address is localhost... rather than the address entered. Of course, it causes failure.
My Q here is how to make the Client.dll.config have the content in my web.config to have the defined max. message size as high as 2147483647? Thanks if you can help.