When deploying you app you may find that some users are located behind proxy servers or similar. The EQATEC Analytics monitor will attempt to connect to the servers using a standard HTTP connection and will optionally setup specific proxy settings if you have configured it on the AnalyticsMonitorSettings instance. However, using these specific settings are typically not desirable unless you know the precise proxy setup of your end users or have a programmatic way of obtaining it. What you typically want is to have your application use the default proxy settings of the underlying system when connecting.
In .NET the default proxy behavior of your application can be altered by using the configuration file. The configuration file offers a specific element for setting up your default proxying within the application. You can find the full specification for
For instance, you may want to use the default credentials when authenticating through the proxy server. Passing the default credentials to the proxy server is turned off by default by can be enabled by adding the following code to your application config:
<
system.net
>
<
defaultProxy
useDefaultCredentials
=
"true"
/>
</
system.net
>
When the monitor is delivering data to the EQATEC Analytics servers it uses the standard HttpWebRequest in the BCL. When created an HttpWebRequest instance inherits the default proxy settings exposed from the WebRequest.DefaultWebProxy static property. You can alter this default by assigning your own proxy to this static property so if you want to use the default credentials for authentication you can do the following
var webProxy = WebProxy.GetDefaultProxy();
webProxy.UseDefaultCredentials =
true
;
WebRequest.DefaultWebProxy = webProxy;
The choice between configuration and code is really up to your individual application. Please note that the monitor, unless explicitly configured otherwise through the proxy settings, uses the default proxy within your application. This means that ultimately the ability to actually obtain connectivity and reach the servers is a responsibility that falls outside the scope of the monitor and lays with the hosting application.
If you are using the COM monitor you are actually using a customized version of
For COM
Søren Enemærke has worked as