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

c# SDK

4 replies [Last post]
  • Login or register to post comments
Sun, 01/13/2013 - 18:48
Paragon99
Offline
Joined: 01/13/2013
Groups: None

Attempting to iterate over view cause exception "The remote server returned an error: (401) Unauthorized."
I can get/set documents.
I read that this occured for someone b/c load balancing, but I only have the one server and no load balancing set up. (or default at the most.)
Also, I read that it could be a timeout issue, but I don't think that is the case because there are only two documents in the entire bucket, and only one of them would be returned by the view.

Couchbase 2.0 (latest ver) installed on Ubuntu Virtual machine (using virtual box)
Using c# sdk 1.8.9 on windows 7 32bit (Host os for Ubuntu)
I know that I have networking set up correctly b/c I can get/set docs in a bucket through c#.

View returns data when testing through browser
View url info _design/SomeClass/_view/SomeClass

var view = client.GetView("SomeClass", "SomeClass");
foreach (var row in view) //Exception thrown.
{
...
}

Advice please?

Top
  • Login or register to post comments
Mon, 01/14/2013 - 10:09
john
Offline
Joined: 01/05/2012
Groups: None

Do you have authentication setup on the bucket? The C# SDK version seems off. The latest should be 1.2.0. That's the version on Nuget and http://www.couchbase.com/develop/net/current.

Top
  • Login or register to post comments
Mon, 01/14/2013 - 11:47
Paragon99
Offline
Joined: 01/13/2013
Groups: None

The Bucket does have a password. I connected to the Views URL directly in a browser, which prompted me for a user name/password... i entered the administrator information, and it loaded the json in the browser... then I ran it again in my c# application, this time it connected. I restarted both computers but the original problem doesn't seem to appear anymore, even so i changed to the 1.2. Thanks.

Top
  • Login or register to post comments
Wed, 01/16/2013 - 07:36
john
Offline
Joined: 01/05/2012
Groups: None

If it happens again, please let me know. For the user id and password in the browser, you need only provide the bucket name/password. Though, as you saw, the admin credentials will work.

Top
  • Login or register to post comments
Sun, 01/20/2013 - 23:54
vergilmakesdc
Offline
Joined: 12/17/2012
Groups: None

Your business is vulnerable to disaster, and may not be adequately prepared. A solid disaster recovery plan can mean the difference between your company’s survival or closing its doors. Even a few days of down time can mean millions of dollars lost.

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