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 ();
CodePudding user response:
Microsoft links: serialization process [control]
[ServiceBehavior ( MaxItemsInObjectGraph =100000)]
Public class MyDataService: IDataService
{
Public former DataPoint [] GetData ()
{
//Implementation omitted
}
}
CodePudding user response:
Hello, I tried it in the way you still make mistakes, please comment,Error message is as follows:
"System.ServiceModel.Com municationException" type of untreated abnormalities in mscorlib. DLL in
Other information: the server did not provide a meaningful reply; This may be the agreement does not match the session early closure or internal server errors caused by