This documentation is archived and is not being maintained.
SoapAddressBinding.Location Property
.NET Framework 1.1
Gets or sets a value representing the URI for the Port to which the SoapAddressBinding applies.
[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
A string containing a URI. The default value is an empty string ("").
Example
[Visual Basic] Dim soapPort As New Port() soapPort.Name = "Service1Soap" soapPort.Binding = New XmlQualifiedName("s0:Service1Soap") ' Create a 'SoapAddressBinding' object for the 'SOAP' protocol. Dim mySoapAddressBinding As New SoapAddressBinding() mySoapAddressBinding.Location = "http://localhost/Service1_vb.asmx" ' Add the 'SoapAddressBinding' object to the 'Port'. soapPort.Extensions.Add(mySoapAddressBinding) ' Add the 'Port' object to the ServiceDescription instance. myDescription.Services(0).Ports.Add(soapPort) [C#] Port soapPort = new Port(); soapPort.Name = "Service1Soap"; soapPort.Binding = new XmlQualifiedName("s0:Service1Soap"); // Create a 'SoapAddressBinding' object for the 'SOAP' protocol. SoapAddressBinding mySoapAddressBinding = new SoapAddressBinding(); mySoapAddressBinding.Location = "http://localhost/Service1_cs.asmx"; // Add the 'SoapAddressBinding' object to the 'Port'. soapPort.Extensions.Add(mySoapAddressBinding); // Add the 'Port' object to the ServiceDescription instance. myDescription.Services[0].Ports.Add(soapPort); [C++] Port* soapPort = new Port(); soapPort->Name = S"Service1Soap"; soapPort->Binding = new XmlQualifiedName(S"s0:Service1Soap"); // Create a 'SoapAddressBinding' object for the 'SOAP' protocol. SoapAddressBinding* mySoapAddressBinding = new SoapAddressBinding(); mySoapAddressBinding->Location = S"http://localhost/Service1_cs.asmx"; // Add the 'SoapAddressBinding' object to the 'Port'. soapPort->Extensions->Add(mySoapAddressBinding); // Add the 'Port' object to the ServiceDescription instance. myDescription->Services->Item[0]->Ports->Add(soapPort);
[JScript] No example is available for JScript. To view a Visual Basic, C#, 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
See Also
SoapAddressBinding Class | SoapAddressBinding Members | System.Web.Services.Description Namespace
Show: