This project contains an HTTP Module and extensions to the HttpRouteCollection to enable
session in Web API 2.
- Build the solution and add
WebApiSessionEnabledRoutes.dllas a reference to your Web API 2 projects. - Use
config.Routes.AddHttpSessionRoute()in your Web API initialization to register session-enabled routes. SetreadOnlySessiontofalsefor routes that only need read access to session; set it totruefor routes that need read and write access to session. - No registration of the HTTP Module is necessary--IIS will register the module automatically on startup.