Forefront Unified Access Gateway (UAG) includes a detection module that detects the device that is connecting to the InternalSite and portal. The detection module determines which portal will be presented to the device: Computer or Other computer, Premium mobile or Non-premium mobile.

The Forefront UAG portal and the InternalSite each have a detection module. The portal files are located in the ...\von\PortalHomePage and ...\von\PortalHomePage\App_Browsers\DetectionModule folders. The InternalSite files are located in the ...\von\InternalSite and ...\von\InternalSite\App_Browsers\DetectionModule folders.

Each detection module uses two files:

The parameters defined in the web.config file are in the format:

  Copy Code
<DetectionParameter Name="Browser" BrowserCapabilityName="Browser" Type="String" />
<DetectionParameter Name="Mobile" BrowserCapabilityName="IsMobileDevice" Type="Boolean" />

The expressions are defined in the format:

  Copy Code
<DetectionExpression Name="Vista" Expression='UserAgent Contains "windows nt 6.0"' />

Each expression can be based on the parameters defined in the DetectionParameters section and the parameter “UserAgent”. The expressions can contain the following operators: ! (not), AND, OR, LT (less than), GT (greater than), LTE (less than or equal to), GTE (greater than or equal to), and Contains (parameter X contains string Y – case insensitive).

The following procedure describes how to modify the web.config file.

  • If you have deployed a Forefront UAG array, you must manually replicate any changes on all array members.

  • If you export the configuration, your customized files are not included in the exported configuration.

  • If you apply a service pack, update, or hotfix to Forefront UAG, your customized files might be overwritten and your customizations lost.

To modify the web.config file

  1. Open the web.config file that you want to modify (for the InternalSite or for the portal).

  2. To create a new parameter, locate the capability in the mobile.browser file and create a new detection parameter in the web.config file:

      Copy Code
    <DetectionParameter Name="Mobile" BrowserCapabilityName="<capability_name>" Type="<capability_type>" />
  3. To create a new expression, for example, to allow Nokia mobile devices to access the Premium mobile site, create a new expression to identify Nokia devices:

      Copy Code
    <DetectionExpression Name="Nokia" Expression='Platform Contains "Nokia"' DefaultValue="false"/>

    and then modify the PremiumMobile expression to include the new Nokia expression:

      Copy Code
    <DetectionExpression Name="PremiumMobile" Expression='Mobile AND !UnsupportedBrowser AND (WindowsCE OR Platform Contains "iPhone" OR Nokia)' DefaultValue="false"/>