Couchbase
  • Why NoSQL?
  • Couchbase Server
  • Download
  • Resources
  • Careers
Home | Forums | SDKs | SDKs

C# Error creating CouchbaseClient object

2 replies [Last post]
  • Login or register to post comments
Thu, 01/31/2013 - 06:52
mszak50
Offline
Joined: 01/31/2013
Groups: None

I'm working with the instructions from http://www.couchbase.com/develop/net/current, and server 2.0.

Following these instructions, I get
"The type initializer for 'Couchbase.CouchbaseClient' threw an exception"

Anyone have any idea on this - I'm sure it's something simple because I'm a beginner with Couchbase.

Here's the code:

...
using Couchbase;
using Enyim.Caching.Memcached;
namespace cbbench
    {
    class Program
        {
        static void Main(string[] args)
            {
            var client = new CouchbaseClient();
            }
        }
    }

Here's the app.config
<?xml version="1.0"?>
<configuration>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/></startup>
  <configSections>
    <section name="couchbase" type="Couchbase.Configuration.CouchbaseClientSection, Couchbase"/>
  </configSections>
  <couchbase>
    <servers bucket="default" bucketPassword="">
      <add uri="http://localhost:8091/pools"/>
    </servers>
  </couchbase>
</configuration>

Top
  • Login or register to post comments
Mon, 02/04/2013 - 05:17
tgrall
Offline
Joined: 09/05/2012
Groups: None

Hello,

Just to be sure:

- can you access the Administration Console from your browser using http://localhost:8091/ ?

- do you have any log/error to share with us?

Regards
Tug

__________________

Tug
@tgrall

Top
  • Login or register to post comments
Mon, 02/04/2013 - 08:34
john
Offline
Joined: 01/05/2012
Groups: None

Did you get the client from NuGet or the zip files? It could be that startup section in your config - I can't recall what that really does, but it's the only difference between a typical config...

Top
  • Login or register to post comments
  • Login or register to post comments
  • Login
  • Register

Company

  • About Us
  • Leadership
  • Customers
  • Partners
  • Contact Us

Product

  • Couchbase Server
  • Couchbase SDKs
  • Use Cases
  • Documentation
  • Forums

Open Source

  • Couchbase Project
  • Couchbase vs. CouchDB

Commercial

  • Subscriptions & Support
  • Training & Services

News

  • Blog
  • Newsletter
  • Press Releases
  • Buzz

Follow Us

    
  • Customer Login
  • Terms of Service
  • Privacy Policy
  • Trademark Policy
  • Site Map

© 2013 COUCHBASE All rights reserved.

Sign in to Couchbase Community

close
  • Create new account
  • Request new password
You are logging into the Forums, Wiki and Issue Tracker