I am getting the following error when I run the simple Windows Server App Fabric 1.0 demo console application:
ErrorCode<ERRCA0021>:SubStatus<ES0001>:Server collection cannot be empty.
Please help me.. What am I missing..?? I have looked every where on the internet and nothing seems to be fixing this issue. thanks..
My application is as follows:
static void Main(string[] args)
{
var factory = new Microsoft.ApplicationServer.Caching.DataCacheFactory(); <--- *** Error here
var cache = factory.GetDefaultCache();
var key = "mykey";
var obj = cache[key];
if (obj == null)
{
cache[key] = "I am data for caching";
}
obj = cache[key];
Console.WriteLine(obj);
Console.Read();
}
My app.config is as follows:
<?xml version="1.0"?>
<configuration>
<configSections>
<section name="dataCacheClients"
type="Microsoft.ApplicationServer.Caching.DataCacheClientsSection, Microsoft.ApplicationServer.Caching.Core" />
</configSections>
<dataCacheClients>
<dataCacheClient>
<hosts>
<host name="MyMachineNameHere" cachePort="22233" />
</hosts>
</dataCacheClient>
</dataCacheClients>
</configuration>