When I call a the GetAuthorizationGroups of a user, locally it works. But on the server I get this error message: While trying to retrieve the authorization groups, an error (5) occurred.
Can someone tell me what I have to do so that it will work everywhere?
Thank you in advance!
This can be issue with permissions under which the said code is running – this user must have permission to access the AD. So try impersonating your ASP.NET app under domain user. For trouble-shooting, you may build a console app with similar code and try to run it under domain user (you may have to disable UAC).