Failing to connect to Server
gtrevor
Posts: 3
I'm having all sorts of issues trying to connect to a server on a Trial instance of SQL Monitor.
I've tried numerous configurations of accounts for the Host Machine and SQL Server instance credentials.
Currently I have it set to the default for the Host Machine (eg: NT AUTHORITYSYSTEM) and am using SQL Server credentials for the SQL server.
I'm getting the following warning in the logs and nothing else. Can I lower the log level to debug? Where is that possible
2017-02-13 03:34:42,370 [ 68] WARN RedGate.Response.Common.Utilities.UserAccountHelper - Error asking Active Directory for current user's principal name
System.InvalidCastException: Unable to cast object of type 'System.DirectoryServices.AccountManagement.GroupPrincipal' to type 'System.DirectoryServices.AccountManagement.UserPrincipal'.
at System.DirectoryServices.AccountManagement.UserPrincipal.FindByIdentity(PrincipalContext context, IdentityType identityType, String identityValue)
at System.DirectoryServices.AccountManagement.UserPrincipal.get_Current()
at RedGate.Response.Common.Utilities.UserAccountHelper.GetUsername()System.InvalidCastException: Unable to cast object of type 'System.DirectoryServices.AccountManagement.GroupPrincipal' to type 'System.DirectoryServices.AccountManagement.UserPrincipal'.
at System.DirectoryServices.AccountManagement.UserPrincipal.FindByIdentity(PrincipalContext context, IdentityType identityType, String identityValue)
at System.DirectoryServices.AccountManagement.UserPrincipal.get_Current()
at RedGate.Response.Common.Utilities.UserAccountHelper.GetUsername()
I've tried numerous configurations of accounts for the Host Machine and SQL Server instance credentials.
Currently I have it set to the default for the Host Machine (eg: NT AUTHORITYSYSTEM) and am using SQL Server credentials for the SQL server.
I'm getting the following warning in the logs and nothing else. Can I lower the log level to debug? Where is that possible
2017-02-13 03:34:42,370 [ 68] WARN RedGate.Response.Common.Utilities.UserAccountHelper - Error asking Active Directory for current user's principal name
System.InvalidCastException: Unable to cast object of type 'System.DirectoryServices.AccountManagement.GroupPrincipal' to type 'System.DirectoryServices.AccountManagement.UserPrincipal'.
at System.DirectoryServices.AccountManagement.UserPrincipal.FindByIdentity(PrincipalContext context, IdentityType identityType, String identityValue)
at System.DirectoryServices.AccountManagement.UserPrincipal.get_Current()
at RedGate.Response.Common.Utilities.UserAccountHelper.GetUsername()System.InvalidCastException: Unable to cast object of type 'System.DirectoryServices.AccountManagement.GroupPrincipal' to type 'System.DirectoryServices.AccountManagement.UserPrincipal'.
at System.DirectoryServices.AccountManagement.UserPrincipal.FindByIdentity(PrincipalContext context, IdentityType identityType, String identityValue)
at System.DirectoryServices.AccountManagement.UserPrincipal.get_Current()
at RedGate.Response.Common.Utilities.UserAccountHelper.GetUsername()
Comments
I have exactly the same issue. Have you found any solution?
I've searched on other forums but couldn't find anything.
https://documentation.red-gate.com/disp ... on+methods
Following this and also increase the Connection Timeout from 15 to 30 seconds resolved my issues.
Glad we were able to get it working for you!
@CharlesJackson1957 I've just replied to this forum post (due to the order of posts when going through the forum) and it looks like the same issue you are having, so please have a look there!
Kind regards,
Alex
Have you visited our Help Center?