Install-package Microsoft.Web.RedisSessionStateProvider
Dependent on:
Dependencies
-
- StackExchange.Redis.StrongName (>= 1.0.488)
1 <system.web>2 <AuthenticationMode= "None" />3 <compilationDebug= "true"targetframework= "4.5" />4 <HttpRuntimetargetframework= "4.5" />5 <sessionstateMode= "Custom"CustomProvider= "Mysessionstatestore">6 <providers>7 <!--either use ' connectionString ' and provide-parameters as String OR use ' host ', ' Port ', ' AccessKey ', ' SSL ', ' Connectio Ntimeoutinmilliseconds ' and ' operationtimeoutinmilliseconds '. -8 <!--' throwOnError ', ' retrytimeoutinmilliseconds ', ' databaseId ' and ' applicationname ' can is used with both options. -9 <!--Ten <add name= "Mysessionstatestore" One host = "127.0.0.1" [String] A port = "" [Number] - AccessKey = "" [String] - SSL = "false" [True|false] the throwOnError = "true" [True|false] - retrytimeoutinmilliseconds = "[Number] " - databaseId = "0" [number] - ApplicationName = "" [String] + connectiontimeoutinmilliseconds = "[Number] " - operationtimeoutinmilliseconds = "+" [number] + connectionString = "<valid Stackexchange.redis connection String>" [string] A loggingclassname = "<assembly qualified class name that contains logging method specified below>" [S Tring] at Loggingmethodname = "<logging method should is defined in Loggingclass. It should is public, static, does not take any parameters and should has a return type of system.io.textwriter.> "[Str ING] - /> - - - <Addname= "Mysessionstatestore"type= "Microsoft.Web.Redis.RedisSessionStateProvider"Host= "192.168.5.102"Port= "6379"AccessKey=""SSL= "false" /> - </providers> - </sessionstate> in </system.web>
ASP. NET session saved to Redis: using Redissessionstateprovider