Last post Feb 14, 2012 10:23 PM by gww
Feb 14, 2012 05:35 AM|umairsiddiqi|LINK
Unknown Error (0X5011)
Exception Details: System Runtime.InteropServices.COMException: unknown Error (0x5011)
Line 51: string groups = LdapAuthentication.GetUserGroups(tbLoginID.Text);
Line 52: //Create the ticket, and add the groups.
Source File: d:\InfoAims\Default.aspx Line 51
[COMException (0x5011): Unknown error (0x5011)
Feb 14, 2012 05:42 AM|vinay13mar|LINK
hi check the link
Feb 14, 2012 10:23 PM|gww|LINK
It would help to see the entire GetUserGroups function.
The error is being thrown from there when its trying to get the list of groups that the name entered into the tbLoginID.Text belongs to. If its only happening to this one person I would see what he/she is putting into the textbox as their name. Do they
need to enter it as Domain\LoginName or just LoginName?
Inside the code of the GetUserGroups function you can add few lines to do some troubleshooting to write out what is happening to see where its failing. Such as, did it find the user account? If it did, was the code able to access the memberof property of
the account? And if it was able to do that, was it able to loop through the list of groups?
What that function seems to be doing it locating the user account and it found accessing the memberof property of the account to get a list of group memberships they belong to. Those names are stored in the conical name format (CN=) so they then need to
look up each group based on that and retrive its friendly name.
You should see in that function some code that looks somewhat like the following. You should add the response.write parts that I added here. It should help troubleshoot where the error is happening. You would also want the wrap the function in a Try/Catch
Block to catch this error so the page will output the write commands.
Dim result As SearchResult = search.FindOne()
If (result Is Nothing) Then
response.write("Could not locate account")
response.write("Account found" & "<br>")
If result.Properties.Contains("memberof") Then
response.write("Accessing Group Memberships" & "<br>")
Dim groupColl as object
For Each groupColl in result.Properties("memberof")
response.write("Group Name: " & groupColl & "<br>")
response.write("Account has no group memberships")