BasicHttpBinding.ProxyAddress Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets or sets the URI address of the HTTP proxy.
public:
property Uri ^ ProxyAddress { Uri ^ get(); void set(Uri ^ value); };
public Uri ProxyAddress { get; set; }
[System.ComponentModel.TypeConverter(typeof(System.UriTypeConverter))]
public Uri ProxyAddress { get; set; }
member this.ProxyAddress : Uri with get, set
[<System.ComponentModel.TypeConverter(typeof(System.UriTypeConverter))>]
member this.ProxyAddress : Uri with get, set
Public Property ProxyAddress As Uri
Property Value
A Uri that serves as the address of the HTTP proxy. The default value is null.
- Attributes
Examples
The following example sets ProxyAddress to application settings.
// Get base address from app settings in configuration
Uri baseAddress = new Uri(ConfigurationManager.AppSettings["baseAddress"]);
BasicHttpBinding binding = new BasicHttpBinding();
binding.ProxyAddress = baseAddress;
The value of this property can also be set in the configuration file.
<configuration>
<system.serviceModel>
<bindings>
<basicHttpBinding>
<binding name="Binding1"
proxyAddress = "http://myProxy">
<security mode="None" />
</binding>
</basicHttpBinding>
</bindings>
</system.serviceModel>
</configuration>
Remarks
If the UseDefaultWebProxy is set to true
, the default address is used and the value of the ProxyAddress set is ignored.
Applies to
Tehke meiega GitHubis koostööd
Selle sisu allika leiate GitHubist, kus saate ka probleeme luua ja läbi vaadata ning päringuid teha. Lisateavet leiate meie kaasautorite juhendist.