I have create a EndpointAddress like that
EndpointAddress address = new EndpointAddress(\"http://example.com/services/OrderService.svc\");
But
On the server you have to add it in the ServiceBehavior Attribute:
[ServiceBehavior(MaxItemsInObjectGraph = int.MaxValue)]
On the client you have to apply it to the endpoint. In this example you can see how to add it to all the endpoints in your ChannelFactory:
var factory = new ChannelFactory(...);
foreach (OperationDescription op in factory.Endpoint.Contract.Operations)
{
var dataContractBehavior = op.Behaviors.Find();
if (dataContractBehavior != null)
{
dataContractBehavior.MaxItemsInObjectGraph = int.MaxValue;
}
}