NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

System.Web.Services.WebMethodAttribute

The WebMethodAttribute class defines the metadata customization attribute used by public web methods within a webservice.

namespace System.Web.Service
{
   public class WebMethodAttribute : Attribute
   {
      // Properties
      public String      Description         { get; set; }
      public bool      EnableSessionState      { get; set; }
      public Transaction   Transaction       { get; set; }
   }
       public enum Transaction
   {
              None = 0,
              Required = 1,
              RequiresNew = 2,
              Supported = 3
       }
}

Properties

Description
Prototype public String Description { get; set; }
Description Description of the web method (used in HTML Contract generation)
EnableSessionState
Prototype public bool EnableSessionState { get; set; }
Description Indicates whether sessionstate is enabled for web method.
Application
Prototype public Transaction Transaction { get; set; }
Description Indicates whether a new transaction context should be created for the context of the web method.