Tuesday, February 5, 2013

Appfabric cache Test Connection failed for ConnectionString

Sometimes when we open the Caching Administrating Windows Powershell we might get this error

Test connection failed for ConnectionString Data Source=rssqlstd08;Initial Catal


og=AppFabric;Integrated Security=True and Provider System.Data.SqlClient

Use-CacheCluster : ErrorCode:SubStatus:Error encountered

in accessing the configuration store. Check the access permissions and existenc

e.

At line:1 char:62

+ Import-Module DistributedCacheAdministration;Use-CacheCluster <<<<

+ CategoryInfo : NotSpecified: (:) [Use-CacheCluster], DataCacheE

xception

+ FullyQualifiedErrorId : ERRCAdmin007,Microsoft.ApplicationServer.Caching

.Commands.UseCacheClusterCommand

This happens cause the powershell tries to connect to the appfabric using the current logged in user.
You should add the user who is trying to administer Appfabric cache cluster to have access to the cache cluster database on the database server.