1

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?

masoud ramezani
  • 22,228
  • 29
  • 98
  • 151
  • Can you enable WCF service tracing (http://msdn.microsoft.com/en-us/library/ms733025.aspx)? You should get a much better detail of the actual error. – Simon Mourier Jul 30 '11 at 06:58

2 Answers2

2

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)

Tim
  • 28,212
  • 8
  • 63
  • 76
0

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.

Jack
  • 717
  • 5
  • 4