locked
AppFabric Caching and Azure Caching in the same project RRS feed

  • Question

  • Hi,

    I have a WCF service based on AppFabric Data Caching. This service is in charge of searching customers in the Cache.

    In some cases, I want to deploy this service in the Cloud (Web Role) and use the Azure Data Caching instead of AppFabric Cache.

    Everything works fine with AppFabric but not when deployed inside a Web Role. I got a TypeInitializer exception when creating the DataCache with an error "Unrecognized element 'autoDiscover'".

    I saw that this error can comes when using an older release of Azure SDK but in my case I'm using the last release (1.8.1.0).

    Any ideas?


    David GROSPELIER Middle-Way - Middleware Senior Architect dgr@middle-way.fr http://www.middle-way.fr

    Wednesday, March 20, 2013 11:23 PM

Answers

  • We dont recommend developing for Appfabric and Azure cache on the same box for these reasons since the binary names/code versions are the same.

    The error indicates that your cloud client is picking up the wrong binaries in all probability. Could you check your core.dll and client.dll files , also check GAC.

    The client  binaries as of now are not interchangeable for working against cloud and on-premises.

    • Marked as answer by Dgrospelier Tuesday, April 16, 2013 9:52 AM
    Saturday, March 23, 2013 5:38 PM
  • Hi,

    You're right about the fact that this is a reference issue. 

    I've compiled two release of my code : one with the Azure Caching dll and one with the AppFabric caching. And the two works fine, one with Azure caching and the other with AppFabric Caching.

    But, in my scenario, I want to demonstrate to a customer that he can have a web service + cache "onpremise" for day to day, and he can put the service+cache on the cloud when I want to deal with a huge number of hits.


    David GROSPELIER Middle-Way - Middleware Senior Architect dgr@middle-way.fr http://www.middle-way.fr

    • Marked as answer by Dgrospelier Tuesday, April 16, 2013 9:52 AM
    Monday, March 25, 2013 5:44 PM

All replies

  • We dont recommend developing for Appfabric and Azure cache on the same box for these reasons since the binary names/code versions are the same.

    The error indicates that your cloud client is picking up the wrong binaries in all probability. Could you check your core.dll and client.dll files , also check GAC.

    The client  binaries as of now are not interchangeable for working against cloud and on-premises.

    • Marked as answer by Dgrospelier Tuesday, April 16, 2013 9:52 AM
    Saturday, March 23, 2013 5:38 PM
  • Hi,

    You're right about the fact that this is a reference issue. 

    I've compiled two release of my code : one with the Azure Caching dll and one with the AppFabric caching. And the two works fine, one with Azure caching and the other with AppFabric Caching.

    But, in my scenario, I want to demonstrate to a customer that he can have a web service + cache "onpremise" for day to day, and he can put the service+cache on the cloud when I want to deal with a huge number of hits.


    David GROSPELIER Middle-Way - Middleware Senior Architect dgr@middle-way.fr http://www.middle-way.fr

    • Marked as answer by Dgrospelier Tuesday, April 16, 2013 9:52 AM
    Monday, March 25, 2013 5:44 PM