` section is user-defined and needs to be registered before use.
For this reason, you also need to add the following at the top of your `web.config` file:
```xml
:
```
With the WURFL Manager object instantiated by `Application_Start`, you are ready to lookup Useragent/Request.
To perform a lookup during your `Default.aspx` page loading, place the following code in ìts `CodeBehind` (the **Default.aspx.cs** file)
```csharp
.
.
using WURFLInFuze;
using WURFLInFuze.Aspnet.Extensions.Config;
.
.
public partial class _Default : System.Web.UI.Page
{
public IDevice wurflDevice;
public String wurflDeviceId;
public String wurflDeviceBrandName;
public String wurflDeviceIsAndroid;
protected void Page_Load(object sender, EventArgs e)
{
/**
* on page load we populate wurflDevice and wurflDeviceId with wurfl detection results
**/
wurflDevice = WurflSampleASPNETApp.WurflManager.LookupRequest(Request);
wurflDeviceId = wurflDevice.Id;
wurflDeviceBrandName = wurflDevice.GetCapability("brand_name");
wurflDeviceIsAndroid = wurflDevice.GetVirtualCapability("is_android");
}
}
.
.
```
> **Note:** You can lookup devices either by passing the whole HttpRequest or the simple User-Agent.
>
In this last case, you may use the following code
```csharp
wurflDevice = WurflSampleASPNETApp.WurflManager.LookupUserAgent(Request.UserAgent);
```
> **Note:** Using the whole HttpRequest will result in a more precise device lookup
Now you can show the lookup result in your Default.aspx file
```html
.
.
.
.
```
You can lookup devices either by passing a plain User-Agent String.
The value associated with a capability (static or virtual) is always expressed as a string, even when
it logically represents a number or a Boolean.
> Don't forget to `Dispose` the `IDevice` and `IWURFLManager` instances when you don't need them anymore.
**Static Capability filtering**
In order to reduce memory usage and increase performance, you can specify a
subset of the 500+ WURFL static capabilities that will be held by the **WURFL manager** object.
You can set capability filters in your `web.config` as follows:
```xml
```
> **Note:** In this case you will be able to access only the `device_os` and `is_tablet` Static Capabilities values of the detected devices.
> Looking for unfiltered Static Capabilities will return an empty string.
**WURFL Cache**
In order to increase performance while processing real HTTP traffic, we suggest setting up an `LRU` cache.
The `LRU` caching strategy will speed up lookup operations on User Agents that have already been processed by keeping them in a Least Recently Used map.
By default the cache will be set to 30000 entries which accounts for 7 to 10 MB of additional memory usage.
Specific concerns regarding memory usage apart, users are advised to size their cache generously (100,000 or more) to increase performance.
For more information, please see [LRU Cache Mechanism](http://en.wikipedia.org/wiki/Cache_algorithms#Least_Recently_Used)
If you want to modify the cache size, you can do it in `InMemoryConfigurer` object:
```xml
.
.
```
If you want to disable the cache feature:
```xml
.
.
```
**WURFL Updater**
If you want to keep your wurfl.zip uptodate with Scientiamobile's data release schedule, you should consider using
the WURFL Updater.
To configure the Updater you need your personal `updater url` taken from the Scientiamobile Customer Vault.
You may configure the periodicity (`frequency`) you would like for update checks, choosing from two values: Daily and
Weekly (the default value is Daily).
Use `logpath` to set `updater log path` where you will find detailed logs about the updater activity
```xml
```
The `frequency` and `logpath` parameters are not mandatory.
> **IMPORTANT - Decommissioning of WurflMatchMode options**
> -----------
> Prior to version 1.9 of the API, users could choose between `WurflMatchMode.Performance` and `WurflMatchMode.Accuracy` engine optimization options.
> These options had been introduced years ago to manage the behavior of certain web browsers and their tendency to present "always different" User-Agent strings that would baffle strategies to cache
> similar WURFL queries in memory.
As the problem has been solved by browser vendors, the need to adopt this strategy has diminished and ultimately disappeared (i.e. there was no longer much to be gained with the performance mode in most circumstances)
> and ScientiaMobile elected to "remove" this option to simplify configuration and go in the direction of uniform API behavior in different contexts.
>
Customers who may find themselves in the unlikely situation of having to analyze significant amounts of
> legacy web traffic, may still enable the old `WurflMatchMode.Performance` behavior by set `WurflMatchMode.FastDesktopBrowserMatch` in their configuration.
>
Please note that users with the old `WurflMatchMode.Performance` target engine will not receive an error.
The old behavior will not be triggered, though. The `WurflMatchMode.Default` target (corresponding to the old `WurflMatchMode.Accuracy`) will be used instead.
-------
**© 2024 ScientiaMobile Inc.
All Rights Reserved.**
**NOTICE:** All information contained herein is, and remains the property of ScientiaMobile Incorporated
and its suppliers, if any. The intellectual and technical concepts contained herein are proprietary to
ScientiaMobile Incorporated and its suppliers and may be covered by U.S. and Foreign Patents, patents
in process, and are protected by trade secret or copyright law. Dissemination of this information or
reproduction of this material is strictly forbidden unless prior written permission is obtained from
ScientiaMobile Incorporated.