0

First of all, I'm new to Kentico CMS.

We download the from here. Then install the application as Windows Azure project.

When I look at web.config, Kentico CMS 7 (as of today) uses Shared Caching which has been deprecated a couple of years back.

Is there any way I can configure to use In-Role Cache (or worst case Cache Service which is still in Preview)?

<!-- Azure AppFabric cache BEGIN -->
<section name="dataCacheClients" 
   type="Microsoft.ApplicationServer.Caching.DataCacheClientsSection, 
       Microsoft.ApplicationServer.Caching.Core" allowLocation="true" 
   allowDefinition="Everywhere"/>
<!-- Azure AppFabric cache END -->

<!-- Azure AppFabric cache BEGIN -->
<dataCacheClients>
  <dataCacheClient name="default">
    <hosts>
      <host name="YourName.cache.windows.net" cachePort="22233"/>
    </hosts>
    <securityProperties mode="Message">
      <messageSecurity authorizationInfo="YourKey"/>
    </securityProperties>
  </dataCacheClient>
  <dataCacheClient name="SslEndpoint">
    <hosts>
      <host name="YourName.cache.windows.net" cachePort="22243"/>
    </hosts>
    <securityProperties mode="Message" sslEnabled="true">
      <messageSecurity authorizationInfo="YourKey"/>
    </securityProperties>
  </dataCacheClient>
</dataCacheClients>
<!-- Azure AppFabric cache END -->
Win
  • 61,100
  • 13
  • 102
  • 181

2 Answers2

1

The host element in the caching configuration points to a caching cluster and it doesn't care about how the cache cluster is deployed - old service, new service or in-role.

If you use the new Caching service you should be able to change the configuration to point at your cache instance using your cache's URL

To use in-role caching you will need to create the relevant load-balanced endpoints for the cloud service and then configure your client with your cloud service URL.

Yossi Dahan
  • 5,389
  • 2
  • 28
  • 50
  • I'm trying to use in role caching for other product and I cannot make it work but your answer looks very interesting for me as I did not create any load-balanced endpoints nor any other thing. Could you provide me with more information about this as I'm not finding further information on the internet about how to make in-role cache work in Windows Azure? Thanks in advance! – fernaramburu Jan 09 '14 at 19:57
  • Apologies Win, fernaramburu and all - I may have been wrong in part as I have tried and have not, so far, managed to connect to a dedicated cache role from outside the cloud service. I will look into this further as soon as I can and report back. In-Role caching does work, of course, within the same cloud service, so it comes down to how your deployment is structured. – Yossi Dahan Jan 15 '14 at 09:46
  • thanks Yossi anyway for replying back my question again! I finally detected my issue and it was something incredible simple that I wasn't seeing and everything now works by following the basic samples from WindowsAzure.com. Thanks anyway again! – fernaramburu Jan 16 '14 at 12:49
0

I found the article in Kentico site, so I posted for others -

Windows Azure Cache Service in Kentico CMS

If you used AppFabric caching in your Kentico CMS projects running on Azure, you could be interested in replacing this caching option with a new Windows Azure Cache because AppFabric cache is no longer provided.

To make it work, you should follow the official guide from Azure documentation - How to Use Windows Azure Cache Service (Preview).

After initially creating the cache and configuring it, you need to open your project in Visual Studio and install Windows Azure Caching NuGet package for CMSApp web role as it is mentioned in the guide.

Another step is to remove xmlns attribute from tag in your web.config file, replace the original and tags with the newly added ones and delete duplicate tag.

The next thing to do is to remove xmlns attribute for tag as well, put tag to the original section and delete the duplicate.

The rest of the steps should correspond to those mentioned in the guide, i.e. replacing [Cache role name or Service Endpoint] with the endpoint, which is displayed on the Dashboard in the Azure Management Portal.

The guide also contains sample codes for creating and retrieving objects from the cache, specifying expiration, storing ASP.NET session state, etc.

Win
  • 61,100
  • 13
  • 102
  • 181