How to add maxItemsInObjectGraph programmatically without using configuration file?

前端 未结 3 2043
陌清茗
陌清茗 2021-02-20 06:39

I have create a EndpointAddress like that

EndpointAddress address = new EndpointAddress(\"http://example.com/services/OrderService.svc\");

But

3条回答
  •  灰色年华
    2021-02-20 07:08

    Alternative: ((ServiceBehaviorAttribute) host.Description.Behaviors[typeof(ServiceBehaviorAttribute)]).MaxItemsInObjectGraph = int.MaxValue;

提交回复
热议问题