拥有 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/