azure - 使用 Azure Redis DB 配置 RedisOutputCacheProvider

标签 azure redis stackexchange.redis

拥有 Web 应用程序项目(Web 表单)和 Azure 订阅。从 Nuget 安装了 RedisOutputCacheProvider 包。

使用建议的配置:

<caching>
      <outputCache defaultProvider="MyRedisOutputCache">
        <providers>
          <!-- Either use 'connectionString' and provide all parameters as string OR use 'host','port','accessKey','ssl','connectionTimeoutInMilliseconds' and 'operationTimeoutInMilliseconds'. -->
          <!-- 'databaseId' and 'applicationName' can be used with both options. -->
          <add name="MyRedisOutputCache" type="Microsoft.Web.Redis.RedisOutputCacheProvider"
               host="myhost.redis.cache.windows.net"
               port="6380"
               accessKey="myKey"
               ssl="true"
               connectionTimeoutInMilliseconds = "5000"
               operationTimeoutInMilliseconds = "1000"
               />

        </providers>
      </outputCache>
    </caching>

应用程序启动时出现永久性错误:无法加载类型“Microsoft.Web.Redis.RedisOutputCacheProvider”。

最佳答案

已解决。 Microsoft.Web.Redis.RedisOutputCacheProvider 与 StackExchange.Redis.StrongName 库版本之间存在冲突。

关于azure - 使用 Azure Redis DB 配置 RedisOutputCacheProvider,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31534403/

相关文章:

HTML 到 PDF Rocket - PDF 生成

azure - Microsoft Azure 上的 phoenix API 的 RBAC

redis - 您可以在 redis 中存储的最大值大小是多少?

c# - Redis session 状态提供程序 - 设置操作区分大小写?

c# - 将字典中的数据批量设置到 Redis

azure - 如何在 Azure 逻辑应用程序中使用 HMAC/签名 key 验证 Webhook 消息?

azure - 停止 azure 函数应用程序是否会终止执行计时器触发函数,或者让它完成运行而不是在之后重新安排

redis - 如何使用 StackExchange.Redis 调用 Redis 函数

node.js - Redis 集群 : will hgetall search all nodes in cluster for key?

redis - 如何使用 StackExchange.Redis 写入从服务器?