我在服务器配置文件中指定了maxItemsInObjectGraph,但在创建客户端配置文件时忽略了该属性,我必须手动将其添加到endpointBehaviors部分。在客户端配置中设置maxItemsInObjectGraph
有没有办法可以在配置文件中进行一些更改,以便每次我通过Svcutil.exe生成客户端配置和代理时,此行为会自动包含在客户端配置文件中?
我试图ading [ServiceBehavior(MaxItemsInObjectGraph = 2147483647)]
服务接口,但它给了我一个错误说Attribute 'ServiceBehavior' is not valid on this declaration type. It is only valid on 'class' declarations.
我的主要问题是将该属性添加到每个客户端配置文件。看起来我必须忍受它。 – Asdfg 2011-06-08 18:38:41