0
Cassandraemon을 사용하여 C# .NET의 Cassandra 인스턴스에 연결하려고합니다. 자격 증명을 지정할 수있는 예제를 찾을 수 없습니다. 내 Cassandra 인스턴스가 AWS의 서버에서 실행 중이며 연결할 때 사용자 이름/비밀번호를 전달해야합니다. Cassandraemon의 CassandraContext에 자격 증명을 전달하려면 어떻게해야합니까?
var builder = new CassandraConnectionConfigBuilder
{
Hosts = new[] { "cassandra.myinstance.com" },
ConsistencyLevel = ConsistencyLevel.QUORUM,
Timeout = TimeSpan.FromSeconds(100),
Keyspace = "mykeyspace"
};
var config = new CassandraConnectionConfig(builder);
using (var context = new CassandraContext(config))
{
Dictionary<string, string> credentials = new Dictionary<string, string>();
credentials.Add("username", "password");
context.Login(credentials);
}
내가 이것을 실행
, 내가context.Login(credentials)
라인에
Apache.Cassandra.AuthenticationException
오류 : 나는 다음과 같은 코드가 있습니다. 자격 증명 사전이 잘못 되었습니까? 열쇠가 아닌 사용자 이름과 암호가 가치입니까?