0

Possible Duplicate:
AppFabric client Virtual Machine issue

I can SUCCESSFULLY connect to app fabric cache cluster server from my dev machine. But when I try to do via VMWare VM hosted .net application, I get the following error:

System.ServiceModel.Security.SecurityNegotiationException: The server has reject ed the client credentials. ---> System.Security.Authentication.InvalidCredential Exception: The server has rejected the client credential

Please help.

My code and config file are as follows:

    try
    {

        var cacheFactory = new DataCacheFactory();
        var cache = cacheFactory.GetCache("default");
        var key = "CachedObjectKey";
        var obj = cache[key];
        if (obj == null)
        {
            obj = "here is a string to cache";
            cache.Add(key, obj);
            Console.WriteLine("object was not in cache");
        }

        obj = cache.Get(key);

        Console.WriteLine(obj.ToString());
    }
    catch (Exception ex)
    {
        if (ex.InnerException != null)
        {
            Console.WriteLine(ex.InnerException.ToString());
        }
        else
        {
            Console.WriteLine(ex.ToString());
        }
    }
    Console.ReadLine();

The config file is as follows:

<?xml version="1.0"?>
<configuration>
  <configSections>
    <section name="dataCacheClient" type="Microsoft.ApplicationServer.Caching.DataCacheClientSection, Microsoft.ApplicationServer.Caching.Core, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" allowLocation="true" allowDefinition="Everywhere"/>
  </configSections>

  <!-- add comments about adding machines..-->
  <dataCacheClient>
    <!--<localCache isEnabled="true" />-->
    <localCache
    isEnabled="true"
    sync="NotificationBased"
    objectCount="10000"
    ttlValue="60" />
    <hosts>
      <host name="mycacheclusterservermachinename" cachePort="22233"/>

    </hosts>
  </dataCacheClient>


  <startup>
    <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/>
  </startup>
</configuration>
Community
  • 1
  • 1
dotnet-practitioner
  • 13,968
  • 36
  • 127
  • 200

1 Answers1

0

The server has rejected the client credentials.

This issue was fixed as soon as VM was added to the same domain as my dev machine.

dotnet-practitioner
  • 13,968
  • 36
  • 127
  • 200