I’m very new to couchbase and I’m trying to get the C# driver to just connect to a cluster I configured and pull from the beer sample.
I imported the drive via NPM in Visual Studio 2013 and I’m trying to follow along with http://docs.couchbase.com/couchbase-sdk-net-1.2/#try-it-out but I"m not having much luck getting any kind of output. The console application pops up, displays nothing and waits for the input key to be hit.
static void Main(string[] args)
{
var client = new CouchbaseClient();
var savedBeer = client.Get("21st_amendment_brewery_cafe");
Console.WriteLine(savedBeer);
Console.Read();
}
Do you have the beer-sample bucket installed? If not login to the console manager and select the Settings tab, Sample Buckets and check the beer-sample sample bucket, then Create.
If you do have the “beer-sample” bucket installed, make sure you can connect to the cluster. Note that Fiddler and other HTTP debuggers (as well as Anti-Virus, firewalls etc) will block streaming HTTP connection that is made from client while bootstrapping.
Notice that you are using the CouchbaseClient.Get(…) method? Switch to the CouchbaseClient.ExecuteGet(…) method and check and see what the Message and Status fields have set in the returned IOperationResult return object.
So, either your ip is wrong in your config, or something is blocking the bootstrapping process. Usually it’s fiddler, but could be your A/V or firewall.
BTW - what you see in your locals can be outputted by doing: result.Message or result.StatusCode.ToEnum().