|Provides the extra information about Web Method.
|This defines the time that how long does web method response will be in cache.
It sets the transaction type whether transactionallowed,NotSupported,Required,Supported, that is supported by namespace System.EnterpriseServices
|It decides whether the method response is buffered ,by default its true.
|This determine whether the session is enabled or not .by default its false.
From the preceding example when exposing the method to the client it shows some information about that method so it will be easy to identify the method that for what method will be use.
This property specifies how long the web method response will be in the cache when the user makes the request for a specific method. The benefit of the CacheDuration property is it holds the entire output of the method in the cache for a predefined duration.
Suppose the first time the user makes a request to the method for the addition of 20 and 30 it returns from the method and the output is stored in the cache and when the next time a request comes for the same number then the result is returned to the client from the cache instead of executing the function again. The following is the syntax of defining the CacheDuration property for a web method attribute.
The following are the some Transaction Options supported by the TransactionOption property:
It's a boolean property having the values true or false, by default it is false. The following are the session modes supported by the web service method:
From all the examples we have learned about the web method attribute properties. I hope this article is useful for all students and beginners. If you have any suggestion related to this article then please contact me and thanks to all. This is my article number 100. It happened only because of your huge support and responses.