The [ServiceContract] attribute is used to define an interface that provides the service. A service should have at least one service contract, decorated by the [ServiceContract] attribute. The following properties can be used with the ServiceContractAttribute:
- ConfigurationName: It specifies the name of the service element in the configuration file.
- Name: This specifies the name of the contract in the WSDL element.
- Namespace: This specifies the namespace of the contract in the WSDL element.
- SessionMode: This specifies whether the contract requires a binding that supports sessions. It can have either of the following three values: Allowed (specifies that the contract supports the session), NotAllowed (specifies that the contract does not support the session), and Required (specifies that the contract does not require the session).
- CallbackContract: This property specifies the return contract in a duplex conversation.
- ProtectionLevel: This specifies the message...