Use the Operation Attribute editor to define operation attributes for
WCF messages.
The Operation Attribute editor lets you define attributes for any
selected message in the Objects tab of the WCF Service Project Painter. For detailed
information about each attribute, please see the Microsoft
MSDN library.
OperationContractMember Name |
Description |
Action |
Gets or sets the WS-Addressing action of the
request message. Type: String. |
AsyncPattern |
Indicates that an operation is implemented
asynchronously using a BeginmethodName and
EndmethodName method pair in a service
contract. |
IsInitiating |
Gets or sets a value that indicates whether the
method implements an operation that can initiate a session on the
server. |
IsOneWay |
Gets or sets a value that indicates whether an
operation returns a reply message. |
IsTerminating |
Gets or sets a value that indicates whether the
service operation causes the server to close the session after any
reply message is sent. |
Name |
Gets or sets the name of the operation. |
ProtectionLevel |
Gets or sets a value that specifies whether the
messages of an operation must be encrypted, signed, or both.
|
ReplyAction |
Gets or sets the value of the SOAP action for the
reply message of the operation. Type: String. |
OperationBehaviorMember Name |
Description |
ReleaseInstanceMode |
Gets or sets a value that indicates when in the
course of an operation invocation to recycle the service object.
|
TransactionAutoComplete |
Gets or sets a value that indicates whether to
automatically complete the current transaction scope if no unhandled
exceptions occur. |
TransactionScopeRequired |
Gets or sets a value that indicates whether the
method requires a transaction scope for its execution. |
AutoDisposeParameters |
Gets or sets whether parameters are to be
automatically disposed. |
Impersonation |
Gets or sets a value that indicates the level of
caller impersonation that the operation supports. |
WebInvokeMember Name |
Description |
BodyStyle |
Gets and sets the body style of the messages that
are sent to and from the service operation. |
Method |
Gets and sets the protocol method (for example,
HTTP) that the service operation responds to. Type: String. Values
can be POST, GET, DELETE, PUT, HEAD, OPTIONS, TRACE, and CONNECT.
|
RequestFormat |
Gets and sets the RequestFormat property. |
ResponseFormat |
Gets and sets the ResponseFormat property.
|
UriTemplate |
The Uniform Resource Identifier (URI) template for
the service operation. Type: String. |
WebGetMember Name |
Description |
BodyStyle |
Gets and sets the body style of the messages that
are sent to and from the service operation. |
RequestFormat |
Gets and sets the RequestFormat property. |
ResponseFormat |
Gets and sets the ResponseFormat property.
|
UriTemplate |
Gets and sets the Uniform Resource Identifier
(URI) template for the service operation. Type: String. |
STAOperationBehavior
It is a PB customized operation attribute. Some functions like SaveDocument or Print involve many UI components, which require a thread running in STA (Single Thread Apartment) mode. But for IIS environment, the default thread mode of the WCF service operation is MTA (Multiple Thread Apartment). If a WCF operation uses such functions, you should define the "STAOperationBehavior" attribute for the operation.