1
具有Web應用程序項目(Web表單)和Azure訂閱。從Nuget安裝RedisOutputCacheProvider軟件包。使用Azure Redis配置RedisOutputCacheProvider DB
使用配置類似建議:
<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'。