Does anybody know how to check whether Windows Server AppFabric caching service is up and running programmatically?
If the AppFabric service is down, it will throws an exception. That is a very expensive process, therefore I need to check if the service is up and running before create a cache object from the AppFabric.
This means that I want to use AppFabric as a caching service only if AppFabric is running, otherwise I want to use System.Web
caching.
Example:
if (checking)
customCache = new WebDataCache();
else
customCache = new AppFabricDataCache();