Unanswered connect to AppFabric error

  • Tuesday, April 10, 2012 8:58 PM
     
     

    Hi , on connect to AppFabric i receive this error :

    Type 'Microsoft.ApplicationServer.Caching.HostNodeDomainConfigurationElementCollection' is an invalid collection type since it does not have a valid Add method with parameter of type 'System.Object'.

    This is my code :

      List<DataCacheServerEndpoint> servers = new List<DataCacheServerEndpoint>(1);

                    string server = "192.168.1.87";
                    servers.Add(new DataCacheServerEndpoint(server, 22233));

                   
                    DataCacheFactoryConfiguration configuration = new DataCacheFactoryConfiguration();
                    configuration.ChannelOpenTimeout = System.TimeSpan.FromSeconds(20);
                    configuration.TransportProperties.ReceiveTimeout = System.TimeSpan.FromSeconds(20);
                    configuration.TransportProperties.ChannelInitializationTimeout = System.TimeSpan.FromSeconds(20);
                    configuration.SecurityProperties = new DataCacheSecurity(DataCacheSecurityMode.None, DataCacheProtectionLevel.None);


                    configuration.Servers = servers;
                    configuration.NotificationProperties = new DataCacheNotificationProperties(200, new TimeSpan(0, 0, 0, 5));


                    configuration.LocalCacheProperties = new DataCacheLocalCacheProperties();

                    DataCacheClientLogManager.ChangeLogLevel(System.Diagnostics.TraceLevel.Off);

                    DataCacheFactory CacheFactory = null;

                    CacheFactory = new DataCacheFactory(configuration);

                   
                    myDefaultCache = CacheFactory.GetCache("Rates");

                    DataCacheOperations allCacheOperations = DataCacheOperations.AddItem |
                                                                      DataCacheOperations.ReplaceItem |
                                                                      DataCacheOperations.RemoveItem;
                    myDefaultCache.AddItemLevelCallback("Rates", allCacheOperations, myCacheLvlDelegate);

    I don't understand what a problem in my code ? 

    Regards

    Alex



    • Edited by alexkg1 Tuesday, April 10, 2012 8:58 PM
    • Edited by alexkg1 Tuesday, April 10, 2012 9:00 PM
    •  

All Replies

  • Tuesday, April 17, 2012 12:14 PM
     
     

    Hi,

    Which version of .NET you have on the box ? With 4.0 are you getting this exception ?

    Thanks

    Arun


    arunks