WebServiceBindingAttribute.Namespace Property
.NET Framework 4
Gets or sets the namespace associated with the binding.
Assembly: System.Web.Services (in System.Web.Services.dll)
The following example specifies a binding named LocalBindingNonDefaultNamespace that is a member of the http://www.contoso.com/MyBinding namespace and defined in the BindingSample XML Web service.
// Binding is defined in this XML Web service, but it is not a part of the default namespace. [ WebServiceBinding(Name="LocalBindingNonDefaultNamespace", Namespace="http://www.contoso.com/MyBinding")] public class BindingSample { [ SoapDocumentMethod(Binding="LocalBindingNonDefaultNamespace")] [ WebMethod() ] public string LocalBindingNonDefaultNamespaceMethod() { return "Member of binding defined in this XML Web service, but a part of a different namespace"; } }
Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, 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.