Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • stephen-ff-team 1 post 21 karma points
    Feb 08, 2022 @ 06:06
    stephen-ff-team
    0

    Type error in Web.config when using Microsoft.Web.Redis.RedisSessionStateProvider

    I am currently attempting to use a Redis cache for session, but am encountering some difficulties.

    I've added this to my Web.config as per https://docs.microsoft.com/en-us/azure/azure-cache-for-redis/cache-aspnet-session-state-provider

    <sessionState mode="Custom" customProvider="MySessionStateStore">
      <providers>
        <add name="MySessionStateStore" type="Microsoft.Web.Redis.RedisSessionStateProvider"
             host=""
             accessKey=""
             ssl="true" />
      </providers>
    </sessionState>
    

    Installed the relevant package using this command

    nuget install Microsoft.Web.RedisSessionStateProvider -Version 4.0.1 -o ./bin -Framework net472
    

    Here is a screenshot of the error: enter image description here

    Restarting IIS did not make any difference. What can I do to resolve this error?

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" button below.

    Continue discussion

Please Sign in or register to post replies