You can configure your Couchbase client either programmatically or using the app.config file with the appropriate Couchbase config section. Using app.config is more flexible and is the preferred approach. Modify your app.config file as follows:
<?xml version="1.0"?> <configuration> <configSections> <section name="couchbase" type="Couchbase.Configuration.CouchbaseClientSection, Couchbase"/> </configSections> <couchbase> <servers bucket="default" bucketPassword=""> <add uri="http://192.168.0.2:8091/pools"/> <add uri="http://192.168.0.3:8091/pools"/> </servers> </couchbase> </configuration>
The URIs in the servers list are used by the client to obtain information about the cluster configuration. If you're running on your local dev machine, include only a single URI using 127.0.0.1 as the address.
The default Couchbase Server installation creates a bucket named "default" without a password, therefore the bucket and bucketPassword attributes are optional. If you created an authenticated bucket, you should specify those values in place of the default settings above.
The TCP/IP port allocation on Windows by default includes a restricted number of ports available for client communication. For more information on this issue, including information on how to adjust the configuration and increase the available ports, see MSDN: Avoiding TCP/IP Port Exhaustion.