This documentation is archived and is not being maintained.

ProxyGenerator::GetClientProxyScript Method (Type, String, Boolean, ServiceEndpoint)

Retrieves the proxy generation code for the specified type using the path and service end point.

Namespace:  System.Web.Script.Services
Assembly:  System.Web.Extensions (in System.Web.Extensions.dll)

public:
static String^ GetClientProxyScript(
	Type^ type, 
	String^ path, 
	bool debug, 
	ServiceEndpoint^ serviceEndpoint
)

Parameters

type
Type: System::Type
The type of the object to obtain the script for.
path
Type: System::String
The location of the endpoint.
debug
Type: System::Boolean
true to include XML code comments; otherwise, false.
serviceEndpoint
Type: System.ServiceModel.Description::ServiceEndpoint
The service endpoint.

Return Value

Type: System::String
The proxy generation code.

ExceptionCondition
ArgumentNullException

The type or path parameter is nullptr.

ArgumentException

The specified type is not supported for proxy generation.

The GetClientProxyScript method returns the proxy-generation ECMAScript (JavaScript) for a Web service, for a Windows Communication Foundation (WCF) service, or for static page methods that have the WebMethodAttribute attribute applied. The type parameter contains the type of the Web service class, WCF service class, or ASP.NET page class. When the type is a WCF service class or interface, the class or interface must have the ServiceContractAttribute attribute applied. If the debug parameter is true, the resulting code contains XML code comments that can be used for IntelliSense support in Visual Studio or other development environments. As a result, the size of the generated script is larger.

.NET Framework

Supported in: 4

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Show: