This repository contains the examples for [ip-intelligence-dotnet].
Projects can be found in the Examples/ folder. Currently, only on-premise examples are available. See below for a list of examples.
Cloud examples will be added once the Cloud service for IP Intelligence becomes available.
See ip-intelligence-data/README (local / GitHub) on how to pull and/or generate necessary files.
For the Mixed examples that combine Device Detection and IP Intelligence:
-
IP Intelligence data file: Place
51Degrees-EnterpriseIpiV41.ipi(or51Degrees-LiteV41.ipi) in theip-intelligence-data/directory at the repository root. -
Device Detection data file: Place
51Degrees-EnterpriseV41.hash(or51Degrees-LiteV41.hash) in theip-intelligence-data/directory at the repository root.
Both data files should be obtained from the respective repositories:
- Device Detection data files: device-detection-data
- IP Intelligence data files: ip-intelligence-data
Examples currently depend on a pre-release version of the FiftyOne.IpIntelligence package.
❗Make sure to enable pre-release packages when installing it:
- Using the .NET CLI:
dotnet add package FiftyOne.IpIntelligence --prerelease- In Visual Studio: check the “Include prerelease” box in the NuGet Package Manager UI.
| Example | Target | Use case |
|---|---|---|
| Framework-Web | .NET Framework 4.6.2 | ASP.NET Framework project. |
| GettingStarted-Console | .NET 8.0 | Simple console app. |
| GettingStarted-Web | .NET 8.0 | ASP.NET Core project. |
| Metadata-Console | .NET 8.0 | Accessing data file's metadata (e.g. listing properties). |
| OfflineProcessing-Console | .NET 8.0 | Batch-processing of IP addresses from a YAML file. |
| Performance-Console | .NET 8.0 | "Clock-time" benchmark for assessing detection speed. |
| UpdateDataFile-Console | .NET 8.0 | Auto-update features: Daily / on Start-Up / Filesystem Watcher |
| Mixed/GettingStarted-Console | .NET 8.0 | Combined Device Detection and IP Intelligence console app. |
| Mixed/GettingStarted-Web | .NET 8.0 | Combined Device Detection and IP Intelligence ASP.NET Core project. |
- In order to test cloud examples against a custom endpoint - you need to launch
OnPremise/Mixed/GettingStarted-APIexample and keep it running while launching other examples. Depending on the IDE you use this can be either done conveniently from the IDE, or just usingdotnet runin theOnPremise/Mixed/GettingStarted-APIdirectory from the command line.
| Example | Target | Use case |
|---|---|---|
| Framework-Web | .NET Framework 4.6.2 | ASP.NET Framework project. |
| GettingStarted-Console | .NET 8.0 | Simple console app. |
| GettingStarted-Web | .NET 8.0 | ASP.NET Core project. |
| Metadata-Console | .NET 8.0 | Get the available properties and evidence keys information from the Cloud |
| GetAllProperties | .NET 8.0 | Get all the available properties for an IP address from the Cloud |
| Mixed/GettingStarted-Console | .NET 8.0 | Combined Device Detection and IP Intelligence console app. |
| Mixed/GettingStarted-Web | .NET 8.0 | Combined Device Detection and IP Intelligence ASP.NET Core project. |
The Mixed examples demonstrate how to combine Device Detection and IP Intelligence engines within a single application:
-
Mixed/GettingStarted-Console: A console application that processes both device detection (from User-Agent / User-Agent Client Hints) and IP intelligence (from IP address) in parallel using the 51Degrees Pipeline API.
-
Mixed/GettingStarted-Web: An ASP.NET Core web application featuring:
- Combined device detection and IP intelligence results in a two-column layout
- IP address lookup functionality with custom IP input
- Client-side evidence collection for enhanced device detection
- Client hints support for improved browser detection
- All device detection and IP intelligence properties displayed
