asp.net - 使用 Redis 缓存替换 Windows Azure 缓存?

标签 asp.net azure caching redis stackexchange.redis

我目前正在使用 Windows Azure 缓存进行缓存,但我想使用 Redis 缓存。我尝试从项目中删除 Windows Azure 缓存包并添加 Redis 缓存包,并进行适当配置。

但是这似乎不起作用,并且给我带来了很多构建错误,因为我相信它仍在寻找 Windows Azure 缓存。

我该如何解决这个问题并成功切换到 Redis 缓存?

还想知道我是否应该从我的 WebRole 的 Web.config 文件中删除此部分?

  <dataCacheClients>
    <dataCacheClient name="default">

  <!--To use the Windows Azure Cache Service, set identifier to be the endpoint of the cache cluster -->
  <autoDiscover isEnabled="true" identifier="testingabc.cache.windows.net" />
  <!--<localCache isEnabled="true" sync="TimeoutBased" objectCount="100000" ttlValue="300" />-->
  <!--Use this section to specify security settings for connecting to your cache. This section is not required if your cache is hosted on a role that is a part of your cloud service. -->
  <securityProperties mode="Message" sslEnabled="true">
    <messageSecurity authorizationInfo="MyAuthInfo" />
  </securityProperties>
</dataCacheClient>

最佳答案

对于此特定错误:错误为:“CloudServices64:找不到启动任务 Microsoft.WindowsAzure.caching\ClientPerfCounterInstaller.exe 的名为“approot\bin\Microsoft.WindowsAzure.caching\ClientPerfCounterInstaller.exe”的文件myprojWebRole 的,请尝试进入 Web 角色项目属性的缓存选项卡来禁用角色内缓存:

enter image description here

关于asp.net - 使用 Redis 缓存替换 Windows Azure 缓存?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35560192/

相关文章:

azure - 将 DNS Azure 配置到 VM 中的多个站点

java - 缓存系统如何实现?

c# - Jquery 复选框在悬停时选中和取消选中

asp.net - <asp :GridView> width, <div> 宽度

重新应用相同的 Terraform 时,Terraform 创建的 Azure 诊断设置会导致 'Resource already exists' 错误

azure - Azure Data Lake 是否支持文件版本控制?

android - 在 React Native 上缓存图像

c - 有没有办法_完全_避免缓存未命中?

asp.net - 带有 SQL Server 的信号器

c# - 在 ASP.NET 调试期间使用 Activator.CreateInstanceFrom 时类型不匹配