Home > Net >  For help each elder: how to use the code in a WCF configuration changes maxItemsInObjectGraph length
For help each elder: how to use the code in a WCF configuration changes maxItemsInObjectGraph length

Time:11-09

Help you master: how to use the code in a WCF configuration changes maxItemsInObjectGraph length limit,
The original code:
ServiceHost host=new ServiceHost (typeof (MainServer), the new Uri (tcpaddress));
Host. AddServiceEndpoint (typeof (IMainServer), tcpBinding, tcpaddress);
ServiceMetadataBehavior behaviors=new ServiceMetadataBehavior ();
Behaviors. HttpGetEnabled=false;
The host. The Description. Behaviors. The Add (Behaviors);
Host. AddServiceEndpoint (typeof (IMetadataExchange), MetadataExchangeBindings. CreateMexTcpBinding (), "tex-mex");
The host. The Open ();
  •  Tags:  
  • C#
  • Related