You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to edit my application in order to use the Active Directory administrator from Azure SQL Server.
With a simple db connection it all works fine, but when I'm trying to get the connection for a single shard with OpenConnectionForKey (in order to get the connection for a DbContext), the login is not working and i receive this message: "Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON".
I'm using 1.3.3 version of library with project targeting to 4.6.2
Here it is the code example: private static DbConnection CreateShardConnection(ShardMap shardMap, int shardingKey, string connectionStr, bool enlistPool) { // No initialization System.Data.Entity.Database.SetInitializer<BF6Context>(null); var cStr = new SqlConnectionStringBuilder(connectionStr); cStr.MultipleActiveResultSets = true; cStr.Enlist = enlistPool; // Ask shard map to broker a validated connection for the given key return shardMap.OpenConnectionForKey<int>(shardingKey, cStr.ConnectionString, ConnectionOptions.Validate); // No initialization System.Data.Entity.Database.SetInitializer<BF6Context>(null); var cStr = new SqlConnectionStringBuilder(connectionStr); cStr.MultipleActiveResultSets = true; cStr.Enlist = enlistPool; // Ask shard map to broker a validated connection for the given key return shardMap.OpenConnectionForKey<int>(shardingKey, cStr.ConnectionString, ConnectionOptions.Validate); }
An example of the connection string that I am trying to inject is:
Persist Security Info=True;User ID=dbadmin@domain.com;Password=strongpassword;Enlist=True;Max Pool Size=6000;MultipleActiveResultSets=True;Connect Timeout=30;Encrypt=True;Authentication="Active Directory Password";Application Name=elasticdbapplication
Previously I had 1.3.0 version library and I've read from this issue (#123) that the target version for Active Directory Authentication is 1.3.2, but with no result as you can see.
Any help is really appreciated
The text was updated successfully, but these errors were encountered:
Hi guys,
I am trying to edit my application in order to use the Active Directory administrator from Azure SQL Server.
With a simple db connection it all works fine, but when I'm trying to get the connection for a single shard with OpenConnectionForKey (in order to get the connection for a DbContext), the login is not working and i receive this message: "Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON".
I'm using 1.3.3 version of library with project targeting to 4.6.2
Here it is the code example:
private static DbConnection CreateShardConnection(ShardMap shardMap, int shardingKey, string connectionStr, bool enlistPool) { // No initialization System.Data.Entity.Database.SetInitializer<BF6Context>(null); var cStr = new SqlConnectionStringBuilder(connectionStr); cStr.MultipleActiveResultSets = true; cStr.Enlist = enlistPool; // Ask shard map to broker a validated connection for the given key return shardMap.OpenConnectionForKey<int>(shardingKey, cStr.ConnectionString, ConnectionOptions.Validate); // No initialization System.Data.Entity.Database.SetInitializer<BF6Context>(null); var cStr = new SqlConnectionStringBuilder(connectionStr); cStr.MultipleActiveResultSets = true; cStr.Enlist = enlistPool; // Ask shard map to broker a validated connection for the given key return shardMap.OpenConnectionForKey<int>(shardingKey, cStr.ConnectionString, ConnectionOptions.Validate); }
An example of the connection string that I am trying to inject is:
Persist Security Info=True;User ID=dbadmin@domain.com;Password=strongpassword;Enlist=True;Max Pool Size=6000;MultipleActiveResultSets=True;Connect Timeout=30;Encrypt=True;Authentication="Active Directory Password";Application Name=elasticdbapplication
Previously I had 1.3.0 version library and I've read from this issue (#123) that the target version for Active Directory Authentication is 1.3.2, but with no result as you can see.
Any help is really appreciated
The text was updated successfully, but these errors were encountered: