Click to Rate and Give Feedback
MSDN
MSDN Library
.NET Development
Previous Versions
.NET Framework 1.1
.NET Framework
Reference
Properties
 Location Property

  Switch on low bandwidth view
This page is specific to
Microsoft Visual Studio 2003/.NET Framework 1.1

Other versions are also available for the following:
.NET Framework Class Library
HttpAddressBinding.Location Property

Gets or sets a value representing the URL of the XML Web service.

[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 specifying the URI for the Port. The default value is an empty string ("").

Example

[Visual Basic] 
' Create the 'HttpAddressBinding' object.
Dim postAddressBinding As New HttpAddressBinding()

postAddressBinding.Location = "http://localhost/Service1.asmx"

' Add the 'HttpAddressBinding' to the 'Port'.
postPort.Extensions.Add(postAddressBinding)

[C#] 

               // Create the 'HttpAddressBinding' object.
               HttpAddressBinding postAddressBinding = new HttpAddressBinding();

               postAddressBinding.Location = "http://localhost/Service1.asmx";

               // Add the 'HttpAddressBinding' to the 'Port'.
               postPort.Extensions.Add(postAddressBinding);

[C++] 

               // Create the 'HttpAddressBinding' object.
               HttpAddressBinding* postAddressBinding = new HttpAddressBinding();

               postAddressBinding->Location = S"http://localhost/Service1.asmx";

               // Add the 'HttpAddressBinding' to the 'Port'.
               postPort->Extensions->Add(postAddressBinding);

[JScript] No example is available for JScript. To view a Visual Basic, C#, or C++ example, click the Language Filter button Language Filter 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

HttpAddressBinding Class | HttpAddressBinding Members | System.Web.Services.Description Namespace

© 2009 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker