Sqreen .NET SDK
This solution contains multiple .NET packages for using Sqreen.
Supported runtime and web frameworks:
| Targets | Web | Project |
|---|---|---|
netstandard2.0, net47 |
ASP.NET Core 2 | Sqreen.SDK.AspNetCore2 |
Environment variables
- SQREEN_APP_NAME
- SQREEN_TOKEN
- SQREEN_BACK_URL
- SQREEN_LOG_LEVEL (case insensitive)
- TRACE
- DEBUG
- INFORMATION (Default)
- WARNING
- ERROR
- NONE
Supported Sqreen Features
Sqreen.SDK.AspNetCore2
- manual user signin, and signup tracking;
- sending custom events (only the event name gets sent. No request/response properties);
- security responses:
- IP blocking;
Quick start
To use Sqreen in your ASP.NET Core 2 application, first you need to register the middleware:
public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
{
app.UseSqreen();
/* ... */
}
NOTE: the middleware must be the first to be registered. If it is not the first, it will raise an exception (this behaviour can be overridden manually to allow any order).
Next step is to register the services for dependency injection:
public void ConfigureServices(IServiceCollection services)
{
/* ... */
services.AddSqreenServices();
/* ... */
}
Configuration
To configure Sqreen, you can use the environment variables SQREEN_TOKEN, SQREEN_APP_NAME, and SQREEN_LOG_LEVEL.
Alternatively, you can configure Sqreen options in ConfigureServices:
services.PostConfigure<SqreenConfiguration>(c =>
{
c.Token = "org_...";
c.ApplicationName = "My Application Name";
});
Using the Sqreen SDK for tracking users and events
The Sqreen SDK is accessible through dependency injection. Just add ISqreenSdk as a parameter.
You can then use the SDK to track events, logins, and signups.
Sqreen.Core
This package targets the oldest netstandard and .NET framework/runtime versions possible.
It should contain as much code as possible.
netstandard1.0
net20
Sqreen.Core.Modern
This package supplements Sqreen.Core with more interfaces and implementations that support more modern asynchronous access patterns.
netstandard1.1
net45
Sqreen.SDK.AspNetCore2
This is a Sqreen SDK implementation targeting
netstandard2.0
net47
It contains the Sqreen SDK for use with ASP.NET Core 2.
Sqreen.Weblog.CoreApp31.AspNetCore2
This is a .NET Core 3.1 web application, which can be used to test the SDK.
It runs on .NET Core 3.1 (netcoreapp3.1).

Formed in 2009, the Archive Team (not to be confused with the archive.org Archive-It Team) is a rogue archivist collective dedicated to saving copies of rapidly dying or deleted websites for the sake of history and digital heritage. The group is 100% composed of volunteers and interested parties, and has expanded into a large amount of related projects for saving online and digital history.
