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
Vertu í samstarfi við okkur á GitHub
Heimildina fyrir þetta efni er að finna á GitHub, þar sem þú getur líka búið til og farið yfir vandamál og sameinað beiðnir. Frekari upplýsingar er að finna í framlagshandbók okkar.