About us |  Help us improve
intelliVERB - Get a fair search of the Internet !
Visual studio .net
SQL Server
Oracle
Main  >  Web Service  >  Web method Email this page to friend
Buffer response
Caching response
Description
Session state
Transaction option
Using aliases
 
 
 
 
 
C#Buffer responseTop

  /*Buffering responses for web method
   When set to true ASP.NET keeps all serialized
   responses of the method in a memory buffer
   before sending them to the client. It has the
   advantage of improving performance of the
   worker process and IIS.
   */

  [WebMethod (BufferResponse=false)]

  public bool Process_EmployeeBenefit(Employee oEmployee)
  {


C#Caching responseTop

  /*Caching results for web method
   When define ASP.NET caches response for the
   duration specified in seconds.
   The default value is 0
   */

   [WebMethod (CacheDuration=30)]

  public bool Process_EmployeeBenefit(Employee oEmployee)
  {


C#DescriptionTop

  /*Specifying a description for web method
   When specify it appears as the DescriptionAttribute
   for the method.
   Its an attribute of string type.
   */

  [WebMethod (Description="Process an employee benefit data")]

  public bool Process_EmployeeBenefit(Employee oEmployee)
  {


C#Session stateTop

  /*Enabling session state for web method
   When set to true the method will maintain
   state of object across sessions.
   The default value is set to false
   */

  [WebMethod (EnableSession=true)]

  public bool Process_EmployeeBenefit(Employee oEmployee)
  {


C#Using aliasesTop

  /*Specifying alias for a web method
   When define the method is identify across SOAP
   messages by this value instead of the method name.
   MessageName attribute can be use to uniquely
   identify overloaded web methods.
   */

  [WebMethod(MessageName="SaveEmployeeBenefit")]

  public bool Process_EmployeeBenefit(Employee oEmployee)
  {


C#Transaction optionTop

  /*Specifying automatic transaction type for a web method
   TransactionOption attribute can take values:
   Disabled: The method will ignore any transaction
   in the current context.
   NotSupported: The method will run in context
   with no governing transaction
   Required: The method will Shares a transaction,
   if one exists, and creates a new transaction, if necessary.
   RequiresNew:The method will run in the context of
   a new transaction, regardless of the state of the current context.
   Supported: The method will Shares a transaction, if one exists.
   System.EnterpriseService.dll is required in order to enable
   transaction in a web method.
   */

  [WebMethod (TransactionOption=TransactionOption.Required)]

  public bool Process_EmployeeBenefit(Employee oEmployee)
  {

You last visited
Client service
Soap header
Sql Server Basic functions
XML
DDL Sql Server
Web Objects
 
 
Make a secure donation now with PayPal!