Custom ASP.NET Session State Management with Redis
What is Redis?
Redis is an open source key value data structure store. keys can be strings, hashes, lists, sets, sorted sets etc. This in memory data store is broadly used in session state storing and caching.
Steps to Implement redis session
1 – Install MSI PACKAGE On Server (Download link)
2 – GO TO C:\Program
Files\Redis
3- Open - redis.windows.conf and redis.windows-service.conf
4 – Add server ip to Config files(10.100.30.16)
ex – bind 127.0.0.1 10.100.30.16
::1
6- Web.config (Client Machine) -
<sessionState mode="Custom" customProvider="MySessionStateStore">
<providers>
<add
name="MySessionStateStore" type="Microsoft.Web.Redis.RedisSessionStateProvider" host="10.100.30.16" port = "6379" accessKey="" ssl="false" />
</providers>
</sessionState>
0 comments:
Post a Comment