I want to write an application that only allows certain users to access it based on their group membership, but i don't want to query the domain for their group memberships.
I have the following code:
but it is returning a false each time i run it. Even if i use the domain\ contex as below, it still comes up false.
Any thoughts?
I have the following code:
VB.NET:
Dim wp As New System.Security.Principal.WindowsPrincipal(System.Security.Principal.WindowsIdentity.GetCurrent())
StatusBarPanel1.Text = wp.IsInRole("Administrators").ToString
but it is returning a false each time i run it. Even if i use the domain\ contex as below, it still comes up false.
VB.NET:
Dim wp As New System.Security.Principal.WindowsPrincipal(System.Security.Principal.WindowsIdentity.GetCurrent())
StatusBarPanel1.Text = wp.IsInRole("domain1\Administrators").ToString
Any thoughts?