Scaleout.AspNetCore
1.0.3
See the version list below for details.
dotnet add package Scaleout.AspNetCore --version 1.0.3
NuGet\Install-Package Scaleout.AspNetCore -Version 1.0.3
<PackageReference Include="Scaleout.AspNetCore" Version="1.0.3" />
paket add Scaleout.AspNetCore --version 1.0.3
#r "nuget: Scaleout.AspNetCore, 1.0.3"
// Install Scaleout.AspNetCore as a Cake Addin #addin nuget:?package=Scaleout.AspNetCore&version=1.0.3 // Install Scaleout.AspNetCore as a Cake Tool #tool nuget:?package=Scaleout.AspNetCore&version=1.0.3
ScaleOut ASP.NET Core Distributed Cache Library
This library provides an implementation of Microsoft.Extensions.Caching.Distributed.IDistributedCache for session state storage using ScaleOut StateServer in ASP.NET Core web applications.
NuGet: Install-Package Scaleout.AspNetCore
Quick Start
To configure your ASP.NET Core web application to use ScaleOut StateServer for session state storage:
- Ensure the ScaleOut Client REST Service on each host running the ScaleOut StateServer service is running. It is strongly recommended to change the startup behavior to Automatic when using this library.
- Install the Scaleout.AspNetCore NuGet package:
Install-Package Scaleout.AspNetCore
- In an application settings file (such as
appsettings.json
), add the following configuration elements, replacing the example configuration values as appropriate to your environment (Configuration elements are described in further detail later in this document):
"ScaleOutStateServer": {
"gateways": [
{
"ip": "10.0.0.100"
},
{
"ip": "10.0.0.101"
}
],
"defaultNamespace": "HelloWorld"
}
- In the
ConfigureServices(IServiceCollection)
initialization method, add the following line(s):
public void ConfigureServices(IServiceCollection services)
{
// Add framework services.
// ...
services.AddSession();
// Add ScaleOut implementation of IDistributedCache.
services.AddScaleoutDistributedCache(Configuration);
// ...
}
Note: If the application configuration file(s) use a different name than "ScaleOutStateServer" for the configuration element, you may use the AddScaleoutDistributedCache(ConfigurationSection)
overload, e.g., services.AddScaleoutDistributedCache(Configuration.GetSection("MyScaleOutConfigurationSection"))
.
That's it! All session access (typically through HttpContext.Session
) will automatically read and store session information to the ScaleOut StateServer in-memory data grid.
Configuration
Gateways (list)
REQUIRED. List of gateways to use to connect to the ScaleOut StateServer service. Each element has two values:
ip (string)
. REQUIRED. The IP address of the gatewayservicePort (integer)
. Optional. The service port for the selected protocol. Default: 4001 (for the SossHttpTransport provider).
Example
"gateways": [
{
"ip": "10.0.0.100",
"servicePort": 4001
},
{
"ip": "10.0.0.101",
"servicePort": 4001
}
]
DefaultNamespace (string)
REQUIRED. The name of the application namespace to use in the ScaleOut StateServer in-memory data grid.
MaxSerializedCacheMemory (integer)
Optional. The maximum size (in bytes) of the serialized network cache held in the client memory process to minimize data transfer to and from the ScaleOut StateServer service when the client is internally known to be working with the latest version of a ScaleOut StateServer data grid object. Default: 10 MB.
MaxGatewayAttempts (integer)
Optional. The number of attempts for any operation which accesses the ScaleOut StateServer data grid before throwing an exception. Default: 3.
Protocol (string)
Optional. Which protocol to use when communicating between the client application and the ScaleOut StateServer service. Currently, only "SossHttpTransport" is supported, which communicates to the ScaleOut StateServer service through the ScaleOut REST API service. Default: SossHttpTransport.
UseSecure (boolean)
Optional. Whether to use the secure version of the selected protocol (e.g., HTTP becomes HTTPS). If set to true
, ensure the associated service is properly configured to accept secure requests. Default: false.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
.NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
.NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen40 was computed. tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.0
- Microsoft.Extensions.Caching.Abstractions (>= 2.0.1)
- Microsoft.Extensions.Logging (>= 2.0.1)
- Microsoft.Extensions.Logging.Abstractions (>= 2.0.1)
- Microsoft.Extensions.Options (>= 2.0.1)
- Microsoft.Extensions.Options.ConfigurationExtensions (>= 2.0.1)
- Newtonsoft.Json (>= 11.0.2)
- Scaleout.Collections (>= 1.0.2-beta)
- System.Linq.Parallel (>= 4.3.0)
- System.ValueTuple (>= 4.4.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Removed dependency on StyleCop.Analyzers