c# SDK
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?
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.
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.
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.
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.