开发者

WCF Service 4.0 --- maxReceivedMessageSize ain't effectively used

I am building a WCF service with framework 4.0 for a special application in house. I have a big array of object to pass from the server to the WPF client. If the array is small enough, everything works fine but if it's over the standart size limit, it doesn't. I tried to change the web.config with the parameter maxReceivedMessageSize but the max size limit error still show with the original value of 65536 even if I put a extreme maxReceivedMessageSize of 1000000000. Here is the web.config as now :

<?xml version="1.0"?>

<behaviors>
  <serviceBehaviors>
    <behavior name="commonBehavior">
      <serviceMetadata httpGetEnabled="true"/>
      <serviceDebug includeExceptionDetailInFaults="true"/>
    </behavior>
  </serviceBehaviors>
</behaviors>

<bindings>
  <basicHttpBinding>
    <binding name="longConnections" maxBufferSize ="1000000000" maxReceivedMessageSize="1000000000"/>
  </basicHttpBinding>
</bindings>

<services>
  <service name ="MiralisWebServices.HMI_Router" behaviorConfiguration="commonBehavior">
    <endpoint address="" 
              binding="basicHttpBinding" 
              bindingConfiguration="longConnections" 
              contract="MiralisWebServices.IHMI_Router"/>
  </service>
</services>

<serviceHostingEnvironment multi开发者_StackOverflowpleSiteBindingsEnabled="true" />

I am still a beginner with web.config with framework 4.0. I hope you guys could help.

Thanks


I think that setting change is also required on the client config.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜