WCF 服务 4.0 --- maxReceivedMessageSize 未有效使用
我正在使用框架 4.0 为内部特殊应用程序构建 WCF 服务。我有一大堆对象要从服务器传递到 WPF 客户端。如果数组足够小,则一切正常,但如果超过标准大小限制,则一切正常。我尝试使用参数 maxReceivedMessageSize 更改 web.config,但即使我将 maxReceivedMessageSize 设置为 1000000000,最大大小限制错误仍然显示为原始值 65536。这是现在的 web.config:
<?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 multipleSiteBindingsEnabled="true" />
我仍然是框架 4.0 的 web.config 的初学者。我希望你们能帮忙。
谢谢
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 multipleSiteBindingsEnabled="true" />
I am still a beginner with web.config with framework 4.0. I hope you guys could help.
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我认为客户端配置也需要进行设置更改。
I think that setting change is also required on the client config.