I wrote a simple .Net console client that works fine when running on the ncache server, but when I copy the exe to a different computer and run it, then I get error. Here's the code. Am I doing something wrong? I'm trying to manually connect to the cache server without a config file using the CacheInitParams.
namespace NcacheTest {
class Program {
static void Main(string[] args) {
CacheInitParams config = new CacheInitParams();
config.BindIP = "x.x.x.x";
var servers = new List<CacheServerInfo>();
servers.Add(new CacheServerInfo("x.x.x.x", 9800));
config.ServerList = servers.ToArray();
Cache cache = NCache.InitializeCache("mycache", config);
int counter = 0;
if(cache.Contains("counter"))
counter = (int)cache.Get("counter");
counter++;
cache.Insert("counter", counter);
Console.WriteLine(counter);
}
}
}
@eeldivad .Please make sure to install Ncache on the machine you are running the code and also it is added to the server node as client node by addclientnode.exe
I wrote a simple .Net console client that works fine when running on the ncache server, but when I copy the exe to a different computer and run it, then I get error. Here's the code. Am I doing something wrong? I'm trying to manually connect to the cache server without a config file using the CacheInitParams.
Here's the error: