-
Notifications
You must be signed in to change notification settings - Fork 0
/
51Degrees.mobi.config
executable file
·106 lines (97 loc) · 7.35 KB
/
51Degrees.mobi.config
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
<?xml version="1.0"?>
<configuration>
<!-- These configuration sections tell .NET how to handle the FiftyOne.Foundation.Mobile
configuration settings further down the web.config file -->
<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>
</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). In Windows Azure this value becomes the name of devices
cloud table that will be used instead of a file.
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)
name A unique identifier for the location. Used for debugging in the log file.(Mandatory)
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 51Degrees.mobi property to
use when evaluating the matchExpression attribute. (Mandatory)
matchExpression a regular expression used to evaluate the value of the property. (Mandatory)
-->
<!--<redirect firstRequestOnly="true"
mobileHomePageUrl="~/Mobile/Default.aspx"
timeout="20"
mobilePagesRegex="/(Mobile|Tablet)/">
<locations>
--><!-- Don't redirect requests that have the noredirect query string parameter. --><!--
<location name="noredirect" url="">
<add property="Url" matchExpression="[&|\?]noredirect"/>
</location>
--><!--Send tablets to their own home page.--><!--
<location name="Tablet" url="~/Tablet/Default.aspx">
<add property="IsTablet" matchExpression="true"/>
</location>
</locations>
</redirect>-->
<!--<log> element controls where and how much information should be recorded in the log.
logFile The location of the log file in ASP.NET or the name of the log table in Windows Azure. (Mandatory)
logLevel Values include Debug|Info|Warn|Fatal and control the level of information
logged. Detauls to Fatal if not specified. (Optional)-->
<!--<log logFile="~/App_Data/51Degrees.mobi.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 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>