Skip to main content

Posts

Showing posts with the label Application State

Application State in ASP.NET Core 1.0

Introduction to Application State Application state provides a way to store in-memory data, which are smaller in size. It includes both global and user-specific data. Such data can be used across application and can be used by all users. Prior to ASP.NET Core 1.0 also there were Application and Session state options available to store such sort of data. Ways of managing Application State? Now question is, which state storage provider is to be used and when? It is influenced by variety of factors: Size of data Format of data Duration to persist data Sensitivity of data, etc. Based on your answers, Application State can be managed in variety of ways like: HTTPContext Cookies Session Querystring and Post Cache Other options (EF, Azure Table Storage, etc.) As part of ASP.NET Core 1.0 release, there is change in HTTPContext object. Hence I’ll emphasis on that. HTTPContext: Items collection of HTTPContext is used to store data which is required...