WebServiceBindingAttribute.Location Property
Gets or sets the location where the binding is defined.
[Visual Basic] Public Property Location As String [C#] public string Location {get; set;} [C++] public: __property String* get_Location(); public: __property void set_Location(String*); [JScript] public function get Location() : String; public function set Location(String);
Property Value
The location where the binding is defined. The default is the URL of the XML Web service to which the attribute is applied.
Example
[Visual Basic, C#] The following example specifies a binding named RemoteBinding that is a member of the http://www.contoso.com/MyBinding namespace and defined at http://www.contoso.com/MyService.asmx?wsdl.
[Visual Basic] ' Binding is defined on a remote server, but this XML Web service implements at ' least one operation in that binding. <WebServiceBinding(Name := "RemoteBinding", _ Namespace := "http://www.contoso.com/MyBinding", _ Location := "http://www.contoso.com/MyService.asmx?wsdl")> _ Public Class BindingSample <SoapDocumentMethod(Binding := "RemoteBinding"), WebMethod()> _ Public Function RemoteBindingMethod() As String Return "Member of a binding defined on another server" End Function End Class [C#] // Binding is defined on a remote server, but this XML Web service // implements at least one operation in that binding. [ WebServiceBinding(Name="RemoteBinding", Namespace="http://www.contoso.com/MyBinding", Location="http://www.contoso.com/MyService.asmx?wsdl")] public class BindingSample { [ SoapDocumentMethod(Binding="RemoteBinding")] [ WebMethod() ] public string RemoteBindingMethod() { return "Member of a binding defined on another server"; } }
[C++, JScript] No example is available for C++ or JScript. To view a Visual Basic or C# example, click the Language Filter button
in the upper-left corner of the page.
Requirements
Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, .NET Compact Framework
See Also
WebServiceBindingAttribute Class | WebServiceBindingAttribute Members | System.Web.Services Namespace | SoapDocumentMethodAttribute