Ark.SessionState.Oracle.Provider 1.1.0

dotnet add package Ark.SessionState.Oracle.Provider --version 1.1.0
                    
NuGet\Install-Package Ark.SessionState.Oracle.Provider -Version 1.1.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Ark.SessionState.Oracle.Provider" Version="1.1.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Ark.SessionState.Oracle.Provider" Version="1.1.0" />
                    
Directory.Packages.props
<PackageReference Include="Ark.SessionState.Oracle.Provider" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Ark.SessionState.Oracle.Provider --version 1.1.0
                    
#r "nuget: Ark.SessionState.Oracle.Provider, 1.1.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Ark.SessionState.Oracle.Provider@1.1.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Ark.SessionState.Oracle.Provider&version=1.1.0
                    
Install as a Cake Addin
#tool nuget:?package=Ark.SessionState.Oracle.Provider&version=1.1.0
                    
Install as a Cake Tool

📦 Ark.SessionState.Oracle.Provider

Custom ASP.NET Session State Provider for Oracle Database

This package provides a drop‑in replacement for the default ASP.NET SQL session state provider, enabling session storage in Oracle Database using Oracle.ManagedDataAccess.

It is designed for classic ASP.NET applications running on .NET Framework 4.7.2.

🚀 Features

Stores ASP.NET session state in Oracle

Uses Oracle.ManagedDataAccess (managed ODP.NET)

Supports sliding and absolute expiration

No external dependencies beyond ODP.NET

Production‑ready for WebForms, MVC, and Web API hosted in System.Web

📥 Installation

Using NuGet Package Manager:

Install-Package Ark.SessionState.Oracle.Provider

Using .NET CLI:

dotnet add package Ark.SessionState.Oracle.Provider

⚙️ Configuration

Add the following to your web.config:

  1. Register the provider

<configuration> <system.web> <sessionState mode="Custom" customProvider="OracleSessionStateProvider"> <providers> <add name="OracleSessionStateProvider" type="Ark.SessionState.Oracle.Provider.OracleSessionStateStore, Ark.SessionState.Oracle.Provider" connectionStringName="OracleSessionState" applicationName="/" /> </providers> </sessionState> </system.web> </configuration>

  1. Add the connection string

<connectionStrings> <add name="OracleSessionState" connectionString="User Id=SESSION_USER;Password=YOUR_PASSWORD;Data Source=YOUR_TNS_ALIAS;" /> </connectionStrings>

🗄️ Database Setup

Create the required table:

CREATE TABLE ASPNET_SESSIONS ( SESSION_ID VARCHAR2(80) PRIMARY KEY, CREATED DATE NOT NULL, EXPIRES DATE NOT NULL, LOCKED NUMBER(1) DEFAULT 0, LOCK_DATE DATE, LOCK_ID NUMBER(10), TIMEOUT NUMBER(10), SESSION_ITEMS BLOB, FLAGS NUMBER(10) );

(If you want, I can generate the full Oracle schema including indexes and cleanup jobs.)

🧪 Example Usage

Once configured, ASP.NET automatically uses Oracle for:

HttpContext.Current.Session["key"]

Session expiration

Session locking

Session serialization

No code changes are required.

🔧 Compatibility

Component

Version

.NET Framework

4.7.2

Oracle Managed Data Access

23.26.200

ASP.NET

WebForms, MVC, Web API (System.Web)

📄 License

MIT License — see the included LICENSE file.

Product Compatible and additional computed target framework versions.
.NET Framework net472 is compatible.  net48 was computed.  net481 was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.1.0 116 4/18/2026
1.0.0 549 10/28/2025