Skip to content

⏱ Sitecore pipeline processor and extensions to the HttpRouteCollection to enable session in Web API 2.

Notifications You must be signed in to change notification settings

coreyasmith/sitecore-web-api-session

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Web API Session-Enabled Routes

This project contains a Sitecore pipeline processor and extensions to the HttpRouteCollection to enable session in Web API 2.

Usage

  1. Add Sitecore's NuGet repository added to Visual Studio.
  2. Build the solution and add WebApiEnableSessionHandler.dll as a reference to your Web API 2 projects.
  3. Deploy WebApiEnableSessionHandler.config into App_Config\Include\zzz.WebApiEnableSessionHandler. Ensure that WebApiEnableSessionHandler.Pipelines.InitializeSessionEnabledRouteHandlers is one of the last processors in the initialize pipeline.
  4. Use config.Routes.AddHttpSessionRoute() in your Web API initialization to register session-enabled routes. Set readOnlySession to false for routes that only need read access to session; set it to true for routes that need read and write access to session.

About

⏱ Sitecore pipeline processor and extensions to the HttpRouteCollection to enable session in Web API 2.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages