LDAP Authentication does not work on Vista after build
Posted on 2007-10-17
I have an application I developed that has an adminstrator toolbar, which should only be visible to Domain admins. I am using the following code to determine if the current user is part of the domain admin group.
Public Function IsInRole(ByVal RoleName As String) As Boolean
If Thread.CurrentPrincipal.Identity.IsAuthenticated Then
If Thread.CurrentPrincipal.IsInRole(RoleName) Then
IsInRole = True
IsInRole = False
This works great on XP machines and it even works on Vista when you run it from visual studio 2005. But once I buld the application and install it on a new Vista machine, it no longer works.
Any help would be appreciated.