Unable to Access SQL Monitor through the URL from Remote
Deepak
Posts: 7 New member
Hi there,
We have just upgraded from SQL Monitor 6 to SQL Monitor 7 latest one. I could able to access the Base Monitor from the same machine where We have installed the SQL Monitor Services but however when we tried to access the URL from the remote machine we are unable to connect. I am posting the Error logs below, please check and let me know what had went wrong and how to correct the same.
[ 163] 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()
2017-02-21 13:22:04,270 [ 471] 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()
2017-02-21 13:22:11,724 [ 457] 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()
Thanks
Deepak
We have just upgraded from SQL Monitor 6 to SQL Monitor 7 latest one. I could able to access the Base Monitor from the same machine where We have installed the SQL Monitor Services but however when we tried to access the URL from the remote machine we are unable to connect. I am posting the Error logs below, please check and let me know what had went wrong and how to correct the same.
[ 163] 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()
2017-02-21 13:22:04,270 [ 471] 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()
2017-02-21 13:22:11,724 [ 457] 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()
Thanks
Deepak
Comments
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?