Skip to content

51Degrees/ip-intelligence-dotnet-examples

Repository files navigation

51Degrees IP Intelligence Engine Examples

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 (coming soon)

Cloud examples will be added once the Cloud service for IP Intelligence becomes available.

⚠️ Required files

See ip-intelligence-data/README (local / GitHub) on how to pull and/or generate necessary files.

Mixed Examples Data Files

For the Mixed examples that combine Device Detection and IP Intelligence:

  1. IP Intelligence data file: Place 51Degrees-EnterpriseIpiV41.ipi (or 51Degrees-LiteV41.ipi) in the ip-intelligence-data/ directory at the repository root.

  2. Device Detection data file: Place 51Degrees-EnterpriseV41.hash (or 51Degrees-LiteV41.hash) in the ip-intelligence-data/ directory at the repository root.

Both data files should be obtained from the respective repositories:

📦 NuGet Package

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.

On-Premise

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.

Cloud

  • In order to test cloud examples against a custom endpoint - you need to launch OnPremise/Mixed/GettingStarted-API example 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 using dotnet run in the OnPremise/Mixed/GettingStarted-API directory 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.

Mixed Examples

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

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 9