<?xml version="1.0"?>
<configuration>
  <!-- Necessary to get the sections below read properly.-->
  <configSections>
    <sectionGroup name="fiftyOne">
      <section name="log" type="FiftyOne.Foundation.Mobile.Configuration.LogSection, FiftyOne.Foundation" requirePermission="false" allowDefinition="Everywhere" restartOnExternalChanges="false" allowExeDefinition="MachineToApplication"/>
      <section name="redirect" type="FiftyOne.Foundation.Mobile.Configuration.RedirectSection, FiftyOne.Foundation" requirePermission="false" allowDefinition="Everywhere" restartOnExternalChanges="false" allowExeDefinition="MachineToApplication"/>
      <section name="detection" type="FiftyOne.Foundation.Mobile.Detection.Configuration.DetectionSection, FiftyOne.Foundation" requirePermission="false" allowDefinition="Everywhere" restartOnExternalChanges="false" allowExeDefinition="MachineToApplication"/>
    </sectionGroup>
    <sectionGroup name="applicationSettings" type="System.Configuration.ApplicationSettingsGroup, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" >
      <section name="Detector.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
    </sectionGroup>
  </configSections>
  <fiftyOne>
    
    <!--<redirect> element controls how requests from mobile devices are handled.
    mobileHomePageUrl   Previously mobileRedirectUrl under the mobile/toolkit element.
                        A url to direct mobile devices to instead of the normal web sites 
                        landing page. (Optional)
    firstRequestOnly    If set to true only the first request received by the web site is
                        redirected to the mobileUrl when the site is accessed from a mobile
                        device. (Optional – defaults to true)
    timeout             The number of minutes of inactivity that should occur before the 
                        requesting device should be treated as making a new request to the
                        web site for the purposes of redirection. If the session is available
                        the session timeout will be used and override this value. (Optional
                        -defaults to 20 minutes)
    devicesFile	        A file used to store the details of devices that have previously
                        accessed the web site to determine if they're making a subsequent
                        request. Needed to ensure multiple worker processes have a consistent
                        view of previous activity. (Optional – random behaviour will be 
                        experienced if not specified on web sites with more than one worker
                        processes)
    mobilePagesRegex    A regular expression that when applied to the current request Path
                        (context.Request.AppRelativeCurrentExecutionFilePath) or the requesting 
                        Urlwill return true if it should be considered a mobile page. Use 
                        this attribute to tell redirection about mobile pages derived from base
                        classes such as System.Web.UI.Page. Redirection needs to be aware of
                        mobile pages so that requests to these pages can be ignored. Any page
                        that derives from System.Web.UI.MobileControls.MobilePage will 
                        automatically be treated as a mobile page irrespective of this 
                        attribute. (Optional)
    originalUrlAsQueryString
                        If set to true the redirected URL will have the original requesting Url 
                        encoded and included as the origUrl query string parameter in the 
                        redirected Url. This will enable the mobile home page to determine the 
                        original requested resource providing the option to display a mobile
                        friendly version. (Optional – defaults to false)
    locations/location  Provides details of different locations requests can be directed to based
                        on the values of defined properties associated with the device or request.
                        (Optional)
      url               the URL of the redirect location to use if all the properties in the 
                        collection match. (Mandatory)
      matchExpression   can be used to provide a regular expression which will take the requesting
                        URL as input match segments to be used in place of numeric parameters contained
                        within {} in the url attribute. (Optional)                       
                        The location element contains a collection of criteria that all need to match 
                        for the location to be used. Two attributes must be specified with each entry.
      property          the property of HttpRequest, HttpRequest.Browser or WURFL capability to 
                        use when evaluating the matchExpression attribute. (Mandatory)
      matchExpression   a regular expression used to evaluate the value of the property. (Mandatory)                        
                        -->
       
    <!--<log> element controls where and how much information should be recorded in the log.    
    logFile   The location of the log file. (Mandatory)
    logLevel  Values include Debug|Info|Warn|Fatal and control the level of information
              logged. Defauls to Fatal if not specified. (Optional)-->
    <log logFile="~/App_Data/Log.txt" logLevel="Info"/>

    <!--<detection> element controls where the data files used are provided. If it is not present
    the embedded device data will be used. This is the default behaviour.
    If a Premium Device Data license key is present in a file with the extension .lic in the bin folder,
    or provided in the FiftyOne.Foundation.Mobile.Detection.Constants.PremiumLicenceKey constant the
    binaryFilePath attribute of the detection element must be provided and the worker process must have
    modify access to the file to enable automatic updates to be downloaded.
    
    binaryFilePath  Path to the binary data file. (Optional - Lite / Mandatory - Premium)
    xmlFiles/add    Provides one or more data files in XML form to use for detection.
      name          The unique internal name of the XML file. (Mandatory)
      filePath      Path to the xml format file. (Mandatory)
      enabled       True or false to enable or disable processing the file. Default true. (Optional)
    -->

    <!-- IMPORTANT - Uncomment this line after you've purchased Premium Data. -->
    <!--<detection binaryFilePath="~/App_Data/51Degrees.mobi-Premium.dat"/>-->

  </fiftyOne>
</configuration>