Home > WebEOC > Admin Guide > Server Configuration > Configure WebEOC for a Proxy

Configure WebEOC for a Proxy

ASP.Net 2.0 introduced a new element for configuration files: the defaultProxy element, <defaultProxy>. Because it is a standard part of .Net and supports more advanced configurations, the defaultProxy element is the optimal choice for configuration files. However, the element does have a couple of drawbacks that need to be considered. For example:

  • The defaultProxy element needs to be added to both the WebEOC web.config and pullservice's pullservice.exe.config files.

  • If the defaultProxy element is not added correctly, it can cause WebEOC to be inoperable.

  • The defaultProxy element cannot be used at the same time as the ClientProxy key.

defaultProxy Example

The following example uses defaults from Internet Explorer (IE), specifies the proxy address, and bypasses local domain addresses. There is also some contextual information from WebEOC to help you in placing the defaultProxy element.

<configuration>
    ...
    <runtime>
    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
      <dependentAssembly>
        <assemblyIdentity name="System.Web.Extensions" publicKeyToken="31bf3856ad364e35" />
        <bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="3.5.0.0" />
      </dependentAssembly>
      <dependentAssembly>
        <assemblyIdentity name="System.Web.Extensions.Design" publicKeyToken="31bf3856ad364e35" />
        <bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="3.5.0.0" />
      </dependentAssembly>
    </assemblyBinding>
  </runtime>
  <system.net>
    <defaultProxy>
      <proxy
        usesystemdefault="true"
        proxyaddress="http://proxyURL:port"
        bypassonlocal="true"
      />
      <bypasslist
        <add address="[a-z]+\.myDomainName\.com" />
      </bypasslist>
    </defaultProxy>
  </system.net>
  <system.web>
    <identity configProtectionProvider="DataProtectionConfigurationProvider">
    ...
</configuration>

The defaultProxy goes inside configuration/system.net:

<configuration>
   <system.net>
      <defaultProxy>
         ...
      </defaultProxy>
   </system.net>

defaultProxy Attributes

useDefaultCredentials
This attribute specifies if the proxy connection should use the impersonated account's credentials when connecting. The default is false, but, in most cases, should be true.

In general, the defaultProxy element should look something like the following:

<defaultProxy useDefaultCredentials="true">
   ...
</defaultProxy>

defaultProxy Elements

Proxy

The proxy element is the most important element contained in the defaultProxy element. It has several attributes, of which are described below, that allow for a wide range of configurations.

  • autoDetect – Specifies if the proxy is automatically detected. The default is false.

autoDetect="true"
  • bypassonlocal – Tells the system if the proxy should not be used for local addresses (http://localhosthttp://loopback, http://127.0.0.1, and/or a URL without a period, as in http://webserver). The addresses that are bypassed can be adjusted in the <bypassList> element.
bypassonlocal="true"
  • proxyaddress – The URL for the proxy; this should be in the form of http://proxyserver:port.
proxyaddress="http://proxyURL:port"
  • scriptlocation – If a configuration script is used to configure the proxy, it can be specified here.
scriptlocation="E:\proxyscript\script.pas"
  • usesystemdefault – Tells the system to use the proxy settings specified inside of IE. Values specified in other attributes override the settings from IE.
usesystemdefault="true"

Proxy Element Example

This example uses the system defaults, specifies a proxy address, and is set to bypass the proxy for local addresses.

<system.net>
    <defaultProxy>
      <proxy
        usesystemdefault="true"
        proxyaddress="http://proxyURL:port"
        bypassonlocal="true"
      />
    </defaultProxy>
  </system.net>

Bypass List

  • The <bypasslist> element specifies addresses that are to be treated as local addresses and, therefore, the code does not go through the proxy when accessing them.

  • In general, the only element that is important here is the <add> element:

<add address="[a-z]+\.myDomainName\.com$" />
  • The value for the address attribute is a regular expression.

  • The trailing $ in the example can be omitted; it is used to keep from matching things like server.esi911.com.

Module

This element allows the configuration of a custom proxy assembly and is an advanced topic that requires development involvement to implement. 

You must to post a comment.
Last modified

Tags

Classifications

This page has no classifications.