Welcome to MSDN Blogs Sign in | Join | Help

Proxy Bypassing Behavior

The HTTP transport and binding element have three settings for controlling the proxy behavior.

public bool BypassProxyOnLocal { get; set; }
public Uri ProxyAddress { get; set; }
public bool UseDefaultWebProxy { get; set; }

UseDefaultWebProxy controls whether manual proxy settings are used or whether the automatically-configured system proxy settings are used. ProxyAddress is how you manually specify the proxy. If you're using the automatically-configured proxy, then you can't also specify a manual proxy address. Finally, BypassProxyOnLocal allows you to control whether the proxy is used for destination addresses that are on your local network.

Requests to any loopback adapter address or the special host name localhost are always bypassed. Even if you set BypassProxyOnLocal to false, requests to these addresses will still not go through the proxy. Unfortunately, overriding this behavior would require writing a custom instance of IWebProxy and attaching that proxy to the underlying web requests that are being made. It's more common to hit this problem during development when you're testing on a machine that doesn't have the same networking setup that the real server will have. One workaround is to install a virtual network adapter that performs loopback in software. This allows you to send requests to an address that is not classified as a loopback without having to add new hardware to your system.

Next time: Registration of Base Addesses

Published Thursday, November 30, 2006 5:00 AM by Nicholas Allen
Filed under: , , ,

Comments

Thursday, November 30, 2006 12:20 PM by Nicholas Allen's Indigo Blog

# Format for Configuring HTTP and TCP Activation

IIS uses some inscrutable strings to configure the activatable bindings of a web site. Here's the minimum

Thursday, November 30, 2006 2:53 PM by Sam Gentile

# New and Notable 130

Lots of great stuff this time. CLR/Interop There has always been a ton of confusion about CLR assembly

Saturday, October 20, 2007 3:31 PM by Sam Gentile

# New and Notable 130

Lots of great stuff this time. CLR/Interop There has always been a ton of confusion about CLR assembly

New Comments to this post are disabled
 
Page view tracker