Description
Trying to access Azure env and the port is closed, N1QL query timed out.
on fiddler I can see
[Fiddler] The connection to '10.3.0.4' failed. <br />Error: TimedOut (0x274c). <br />System.Net.Sockets.SocketException A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond 10.3.0.4:8093
However on Visual Studio i'm getting the following exception on the result:
Cannot deserialize the current JSON array (e.g. [1,2,3]) into type 'Couchbase.N1QL.QueryResultData`1[System.Object]' because the type requires a JSON object (e.g.
) to deserialize correctly.
To fix this error either change the JSON to a JSON object (e.g.
) or change the deserialized type to an array or a type that implements a collection interface (e.g. ICollection, IList) like List<T> that can be deserialized from a JSON array. JsonArrayAttribute can also be added to the type to force it to deserialize from a JSON array.
Path '', line 1, position 1.
Tried it with 2.3.8 and with 2.3.9 with bucket and cluster queries with authentication.
The sample code i've been using:
};
var credentials = new ClusterCredentials
{
ClusterUsername = "Administrator",
ClusterPassword = "password",
BucketCredentials = new Dictionary<string, string>
{
// bucketName, bucketPassword
}
};
const string query = "SELECT * FROM `travel-sample` LIMIT 10";
var cluster = new Cluster(cc);
cluster.Authenticate(credentials);
var bucket = cluster.OpenBucket("travel-sample");
var result1 = bucket.Get<String>("airline_10");
Console.WriteLine(result1);
try
{
var result = cluster.Query<dynamic>(query);
foreach (var row in result.Rows)
}
catch (Exception ex)
Console.Read();
}
}