J
John Wright
I ran FxCop against a program and was pleased with the security review
except I get the following error:
Do not indirectly expose methods
How would I fix this code so this error goes away. I think I understand the
error, but not the fix. I really need to fix this as it is called from
other programs and I do not want code elevating privileges in this function.
Thanks.
John
Here is the code that is being called
Public Function GetUserGroups(ByVal Domain As String, ByVal Username As
String) As List(Of String)
GetUserGroups = New List(Of String)
Dim ADGroups As Object
Dim adGroup As Object
'Code that retrieves a user's LDAP groups based on login
Return GetUserGroups
End Function
except I get the following error:
Do not indirectly expose methods
How would I fix this code so this error goes away. I think I understand the
error, but not the fix. I really need to fix this as it is called from
other programs and I do not want code elevating privileges in this function.
Thanks.
John
Here is the code that is being called
Public Function GetUserGroups(ByVal Domain As String, ByVal Username As
String) As List(Of String)
GetUserGroups = New List(Of String)
Dim ADGroups As Object
Dim adGroup As Object
'Code that retrieves a user's LDAP groups based on login
Return GetUserGroups
End Function