Gets or sets a value that indicates whether to invoke the method by using HTTP GET.
Assembly: System.Web.Extensions (in System.Web.Extensions.dll)
The use of HTTP GET for invoking the Web service method follows the same guidelines for any other Web interaction. HTTP GET should be used only for operations where no sensitive data is exposed and when the server action does not have side effects.
Setting the property to true might pose a security risk for your application if you are working with sensitive data or transactions. In GET requests, the message is encoded by the browser into the URL and is therefore an easier target for tampering.
The following example shows how to apply ScriptMethodAttribute to a Web method with the property set to true. This code example is part of a larger example provided for the ScriptMethodAttribute class.
Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.