【发布时间】:2011-06-08 17:48:36
【问题描述】:
我在服务器配置文件中指定 maxItemsInObjectGraph,但是在创建客户端配置文件时,此属性被忽略,我必须在 endpointBehaviors 部分手动添加它。
有没有办法我可以在配置文件中进行一些更改,以便每次我通过 Svcutil.exe 生成客户端配置和代理时,此行为会自动包含在客户端配置文件中?
我尝试将 [ServiceBehavior(MaxItemsInObjectGraph = 2147483647)] 添加到服务接口,但它给了我一个错误提示 Attribute 'ServiceBehavior' is not valid on this declaration type. It is only valid on 'class' declarations.
【问题讨论】:
标签: wcf wcf-binding