I use AppFabric as a NHibernate 2L cache provider.
I have installed AppFabric cache service, configured the cache cluster and one extra cache apart from the default one:
<dataCache size="Small">
<caches>
<cache consistency="StrongConsistency" name="NHibernate">
<policy>
<eviction type="Lru" />
<expiration defaultTTL="10" isExpirable="true" />
</policy>
</cache>
<cache consistency="StrongConsistency" name="default">
<policy>
<eviction type="Lru" />
<expiration defaultTTL="10" isExpirable="true" />
</policy>
</cache>
</caches>
<hosts>
<host replicationPort="22236" arbitrationPort="22235" clusterPort="22234"
hostId="963417840" size="2047" leadHost="true" account="ZEUS\CATALINP"
cacheHostName="AppFabricCachingService" name="ZEUS"
cachePort="22233" />
</hosts>
</dataCache>
Everything seems ok on the cache provider side.
Cache client's configuration, as used in app.config, is the following:
<dcacheClient localCache ="True" deployment="simple">
<localCache isEnabled="True" sync="TimeoutBased" ttlValue="300" />
<hosts>
<host name="ZEUS" cachePort="22233" cacheHostName="AppFabricCachingService"/>
</hosts>
</dcacheClient>
Nothing special, just the common settings.
Yet, when I run the applicacion, I can see the following output in the debugger:
DeadServerCallback Called, Server URI: net.tcp://ZEUS:22233/AppFabricCachingService DeadServerCallback: Matches My Server, Cleaning Pending Requests SendMsgAndWait: Remote Store Operation Failed: msgId = 1 ExecuteAPI: Response is Null, msgId = 1
Finally, the application crashed with the following message:
"ErrorCode:Cache::Get : Could not contact the cache service. Contact administrator and refer to product help documentation for possible reasons."
The cache service seems to be correctly configured (I have succeeded to connect to it through Powershell commands), the NHibernate configuration seem to be correct as well, yet the NHibernate cannot connect to the cache service.
Has anybody experiences something similar ?
Thank you,
C.