Implement azure colocated caching

前端 未结 3 473
借酒劲吻你
借酒劲吻你 2021-01-05 08:33

Using VS2012 I added the caching feature from the WebRole Properties Caching Tab. Among others, it generated the following XML in web.config:

  

        
3条回答
  •  一整个雨季
    2021-01-05 09:20

    Yes. Step though the various config and I did reinstall the Azure Tools as well during my troubleshooting.

    There is the Web.config which is mentioned above, but in your service definition, ensure it has a line:

    
    

    This was my root issue, but then had changed nearly everything once trying to get it to work. Also, when I looked at the web role, the Caching tab was missing which was fixed by reinstalling Azure tools (I did a clean up of old ones which may or may not have helped). I initiated it via the Azure site examples rather than what is above.

    DataCache AgencyCache = new DataCache("AgencyDataValidation");
    

    Remembering to import:

    using Microsoft.ApplicationServer.Caching;
    

提交回复
热议问题