Is there a limitation for number of Operation Contracts in WCF services?

戏子无情 提交于 2019-12-24 12:18:15

问题


I have a WCF service that contains a number of operation contracts. When the number of these operations was too many, I get an error in wcftestclient for binding service. When I split this service into two services this problem is solved.

What is the problem? Is there a limitation for number of operation contracts in WCF services?


回答1:


I'm not aware of a limit on the number of operation contracts for the WCF Test Client, but in general it is considered good practice to limit the number of operation contracts in any given service to a small number (I think Juval Lowry recommends about 12 in his book).

The WCF Test Client doesn't support all features of WCF - could it be that one or more of your operations is using something that isn't supported?

Types: Stream, Message, XmlElement, XmlAttribute, XmlNode, types that implement the IXmlSerializable interface, including the related XmlSchemaProviderAttribute attribute, and the XDocument and XElement types and the ADO.NET DataTable type.

Duplex contract.

Transaction.

Security: CardSpace , Certificate, and Username/Password.

Bindings: WSFederationbinding, any Context bindings and Https binding, WebHttpbinding (Json response message support).

Taken from WCF Test Client (WcfTestClient.exe)




回答2:


I don't think there is such a limit. In one of my projects, the service contract consisted of hundreds of operation contract, this made the service terrible. Then, we divided it according to business. SO I think you should group the operations according to business.



来源:https://stackoverflow.com/questions/6881277/is-there-a-limitation-for-number-of-operation-contracts-in-wcf-services

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!