<div>Our IT division made an application in .NET which is being deployed for a client here in UAE. Afterwords they told us to integrate with their Active directory which we had done and the application was running fine.</div> <div></div> <div>Now after two
months one error came when the user put its credentials to login. The client also have developers and they say its our code problem not an issue with our server. They also say that the developers doesnt follow the basic standard while doing coding and they
just completed the coding to getrid of it.</div> <div></div> <div>We checked with our team and they say its not a code problem its something related to authentication issue. As you are an expert so by looking at the error can you let me know is it a code problem
or something else.</div> <div></div> <div>
Error Details:
Unknown Error (0X5011)
Exception Details: System Runtime.InteropServices.COMException: unknown Error (0x5011)
Source Error:
Line 51: string groups = LdapAuthentication.GetUserGroups(tbLoginID.Text);
Line 52: //Create the ticket, and add the groups.
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")
Else
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>")
Next groupColl
Else
response.write("Account has no group memberships")
End If
End If
umairsiddiqi
0 Points
1 Post
Application Error
Feb 14, 2012 05:35 AM|LINK
Error Details:
Unknown Error (0X5011)
Exception Details: System Runtime.InteropServices.COMException: unknown Error (0x5011)
Source Error:
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
Stack Trace:
[COMException (0x5011): Unknown error (0x5011)
Thanks
</div>vinay13mar
Star
7756 Points
1626 Posts
Re: Application Error
Feb 14, 2012 05:42 AM|LINK
hi check the link
http://support.microsoft.com/kb/969166
V.K.Singh
gww
Contributor
2143 Points
458 Posts
Re: Application Error
Feb 14, 2012 10:23 PM|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") Else 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>") Next groupColl Else response.write("Account has no group memberships") End If End If