Validation Behaviors for Client and Service
The other day I talked about the built-in service validation behaviors but these behaviors are only a part of the overall validation story. Today I've got more of an end-to-end overview of behavior validation. Although validation is similar whether you're building a client or service (remember that client proxies have behaviors too) I'll also point out where the differences take place.
How a service performs behavior validation:
1.
Run built-in service behaviors
2.
Run user-defined service behaviors
3.
For each endpoint on the service:
1.
Run user-defined contract behaviors
2.
Run user-defined endpoint behaviors
3.
For each operation on the contract:
1.
Run user-defined operation behaviors
How a client performs behavior validation:
1.
Run user-defined contract behaviors
2.
Run built-in endpoint behaviors (these are mostly the same as the built-in service behaviors but not all of the checks are performed for the client)
3.
Run user-defined endpoint behaviors
4.
For each operation on the contract:
1.
Run user-defined operation behaviors
If more than one endpoint shares a contract, then the contract behaviors will run again and again while the operation behaviors will only run once. That's because an IContractBehavior operates on the contract and endpoint while an IOperationBehavior operates on the operation and contract.
Next time: Single Reader for MSMQ
Comments
Anonymous
March 19, 2008
PingBack from http://msdnrss.thecoderblogs.com/2008/03/19/validation-behaviors-for-client-and-service/Anonymous
March 19, 2008
Why do the messages logged by my service show addressing headers but those headers disappear when the