THE Fastest and most Accurate device detection for .NET - professionally maintained device data
Clone or download
Josh Grew Josh Grew
Josh Grew and Josh Grew DOC/DATA: Added GDPR disclaimer for consumer reference. Updated the L…
…ite files for May data.

In preparation for GDPR a disclaimer has been added as a .md file for consumer reference.
Updated the Lite files for May data.
Latest commit 2ed24cf May 24, 2018

README.md

51Degrees Device Detection for Microsoft .NET

Recent Changes | Supported Databases | .NET Developer Documention | Available Properties

Need C | Java | PHP | Python | Perl | Node.js?

Server Side: Use code like...

Request.Browser["IsMobile"]

or

Request.Browser["IsTablet"]

... from within a web application server side to determine the requesting device type.

Client Side: Include...

https://[YOUR DOMAIN]/51Degrees.features.js?DeviceType&ScreenInchesDiagonal

... from Javascript to retrieve device type and physcial screen size information. Use Google Analytics custom dimensions to add this data for more granular analysis.

Offline: Use...

var detectionProvider = new Provider(StreamFactory.Create("[DATA FILE LOCATION]"));
var deviceType = detectionProvider.Match("[YOUR USERAGENT]")["DeviceType"];

... to perform offline analysis of web logs with User-Agent headers.

Review All Properties

What's needed?

The simplest method of deploying 51Degrees device detection to a .NET project is with NuGet. Just search for 51Degrees on NuGet.

This GitHub repository and NuGet include 51Degrees free Lite device database. The Lite data is updated monthly by our professional team of analysts.

Data files which are updated weekly and daily, automatically, and with more properties and device combinationsare also available.

Compare Device Databases

Recent Changes

Version 3.2.19 Highlights

  • ASP.NET integration features such as bandwidth monitoring and profile overrides previously stored their 'enabled' setting in HttpApplicationState. This uses a lot of locking which could cause problems in highly concurrent web applications. The setting will now be stored in a static field instead.
  • Updated the Lite Binary files for November 2017.

Major Changes in Version 3.2

  • Embedded data has been removed from the assembly and now must be provided from the App_Data folder.
  • .NET 3.5 is not supported in this release in order to use memory mapped files and simplify overriding default browser capabilities.
  • In stream mode entity data properties that can allocate large arrays only initialise these arrays when needed.
  • Caches used with stream operation are now fixed memory size and serviced via the thread pool.
  • Automatic update processes uses temporary files rather than main memory to verify integrity of updated files prior to using them.
  • Temporary files are now created in the App_Data/51Degrees folder of the web application rather than a UNC path or the master data file folder.
  • Values associated with Profiles are now retrieved using a more efficient algorithm.
  • DataSet.Properties collection now has a string accesser to make retrieving properties by name simpler.
  • Web sites using memory mode use a byte array to improve start up time.
  • Version 3.2 data file formats are supported in parallel with version 3.1 data files.
  • 51Degrees unit tests are now part of the open source distribution.