C# 在本地和云上配置azure共享缓存

C# 在本地和云上配置azure共享缓存,c#,azure,shared-cache,C#,Azure,Shared Cache,我完全无法让共享缓存工作 在本地,我运行了一个mvc4站点,并由此创建了一个云项目。我在角色上启用了缓存,并将其设置为同一位置。到目前为止一切都很好 我添加了NuGet的2.1包,该包安装了相关库,并更新了我的web配置: 配置部分: 我让存储仿真器运行,并从计算仿真器进行站点调试。我似乎无法将站点配置为使用azure缓存。请确保您使用的是SDK 2.1版。缓存2.1软件包仅适用于最新版本的SDK。请参见下面的屏幕截图。您可能希望在此处签出此线程: 请确保您使用的是SDK版本2.1。缓存2.1软

我完全无法让共享缓存工作

在本地,我运行了一个mvc4站点,并由此创建了一个云项目。我在角色上启用了缓存,并将其设置为同一位置。到目前为止一切都很好

我添加了NuGet的2.1包,该包安装了相关库,并更新了我的web配置:

配置部分:


我让存储仿真器运行,并从计算仿真器进行站点调试。我似乎无法将站点配置为使用azure缓存。请确保您使用的是SDK 2.1版。缓存2.1软件包仅适用于最新版本的SDK。请参见下面的屏幕截图。您可能希望在此处签出此线程:


请确保您使用的是SDK版本2.1。缓存2.1软件包仅适用于最新版本的SDK。请参见下面的屏幕截图。您可能希望在此处签出此线程:


先生,您是位绅士和学者。我找到了更新的sdk并安装了2.1版本-再见,冻结,你好网页。我一定是错过了2.1的机会,因为我刚刚开始使用Azure。先生,您是一位绅士和学者。我找到了更新的sdk并安装了2.1版本-再见,冻结,你好网页。我一定是错过了2.1的机会,因为我刚刚开始使用Azure。
<section name="dataCacheClients" type="Microsoft.ApplicationServer.Caching.DataCacheClientsSection, Microsoft.ApplicationServer.Caching.Core" allowLocation="true" allowDefinition="Everywhere" />
<section name="cacheDiagnostics" type="Microsoft.ApplicationServer.Caching.AzureCommon.DiagnosticsConfigurationSection, Microsoft.ApplicationServer.Caching.AzureCommon" allowLocation="true" allowDefinition="Everywhere" />
<dataCacheClients>
<dataCacheClient name="default">
  <!--To use the in-role flavor of Windows Azure Caching, set identifier to be the cache cluster role name -->
  <!--To use the Windows Azure Caching Service, set identifier to be the endpoint of the cache cluster -->
  <autoDiscover isEnabled="true" identifier="" />
  <!--<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="false">
    <messageSecurity authorizationInfo="[Authentication Key]" />
  </securityProperties>-->
</dataCacheClient>
_cache = new DataCache("default");