This
article explains about the how to configure the service and client transaction
mode in WCF service.
This
setting ensures that service uses the client’s transaction if possible or a
server side transaction when the client does not have a transaction.
This
settings ensures the service uses only the client’s transaction
This
seeing ensures that the service always has a transaction, separated from any
transaction its client may or may not have.
This
setting ensures service does not use transaction
- Client transaction – Transaction setting propagated or initiated from the client side
- Server transaction – Transaction setting propagated or initiated from server side
Client/Server
transaction mode:
- Enable the TransactionFlow=true in binding configuration
- Set TransactionFlowOption.Allowed in the operation contract
- Set TransactionScopeRequired=true in the operation contract
Client
transaction mode:
- Enable the TransactionFlow=true in binding configuration
- Set TransactionFlowOption. Mandatory in the operation contract
- Set TransactionScopeRequired=true in the operation contract
Service
transaction mode:
- Disable the TransactionFlow=false in binding configuration
- Set TransactionFlowOption. NotAllowed in the operation contract
- Set TransactionScopeRequired=true in the operation contract
None
transaction mode:
- Disable the TransactionFlow=false in binding configuration
- Set TransactionFlowOption. NotAllowed in the operation contract
- Set TransactionScopeRequired=false in the operation contract
Binding
Transaction flow
|
TransactionFlowOption
|
TransactionScopeRequired
|
Transaction
mode
|
False
|
Allowed
|
False
|
None
|
False
|
Allowed
|
True
|
Service
|
False
|
NotAllowed
|
False
|
None
|
False
|
Allowed
|
True
|
Service
|
True
|
Allowed
|
False
|
None
|
True
|
Allowed
|
True
|
Client/Service
|
True
|
Mandatory
|
False
|
None
|
True
|
Mandatory
|
True
|
Client
|
No comments:
Post a Comment