Mono Support ActiveDirectory integration 

Viewed 47989 time(s), 5 post(s), 6/8/2011 11:19:47 AM - by JoeUser
6/8/2011 11:19:47 AM
26 Reputation 11 Total posts

Hi,
I am trying to integrate MonoX with our ActiveDirectory server following your tutorial at http://www.mono-software.com/blog/post/Mono/92/MonoX-Active-Directory-integration/
I am getting the following error message:

[ProviderException: Unable to query Active Directory.]
   MonoSoftware.MonoX.ActiveDirectoryRoleProvider.GetRolesForUser(String username) +913
   System.Web.Security.RolePrincipal.IsInRole(String role) +164
   System.Web.Configuration.AuthorizationRule.IsTheUserInAnyRole(StringCollection roles, IPrincipal principal) +123
   System.Web.Configuration.AuthorizationRule.IsUserAllowed(IPrincipal user, String verb) +256
   System.Web.Configuration.AuthorizationRuleCollection.IsUserAllowed(IPrincipal user, String verb) +199
   System.Web.UI.WebControls.WebParts.PersonalizationProvider.DetermineUserCapabilities(WebPartManager webPartManager) +321
   System.Web.UI.WebControls.WebParts.WebPartPersonalization.Load() +82
   System.Web.UI.WebControls.WebParts.WebPartPersonalization.LoadInternal() +23
   System.Web.UI.WebControls.WebParts.WebPartManager.OnInit(EventArgs e) +293
   System.Web.UI.Control.InitRecursive(Control namingContainer) +333
   System.Web.UI.Control.InitRecursive(Control namingContainer) +210
   System.Web.UI.Control.InitRecursive(Control namingContainer) +210
   System.Web.UI.Control.InitRecursive(Control namingContainer) +210
   System.Web.UI.Control.InitRecursive(Control namingContainer) +210
   System.Web.UI.Control.InitRecursive(Control namingContainer) +210
   System.Web.UI.Control.InitRecursive(Control namingContainer) +210
   System.Web.UI.Control.InitRecursive(Control namingContainer) +210
   System.Web.UI.Control.InitRecursive(Control namingContainer) +210
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +378

Anybody knows how to solve this?



1
6/8/2011 11:21:55 AM
7207 Reputation 956 Total posts

Hi,
Could you please look into your log files (/MonoX/ApplicationData/Logs) to see if there are any detailed error descriptions related to this error? You can post the log file here or send me a private message.

2
6/8/2011 11:22:51 AM
26 Reputation 11 Total posts

Thanks Denis, I just sent a private message to you.

3
6/8/2011 11:30:40 AM
7207 Reputation 956 Total posts

Just as expected, the log file contains the following error message:

System.DirectoryServices.AccountManagement.PrincipalOperationException: Information about the domain could not be retrieved (1355).

This is probably caused by the DNS misconfiguration on your network. There are lot of articles on this topic:

http://social.msdn.microsoft.com/Forums/en/netfxbcl/thread/219c4b4b-b43a-4dbc-9e3c-a1135879c5f9
http://stackoverflow.com/questions/511396/request-a-users-roles-in-ad-when-caller-is-not-in-domain
http://directoryprogramming.net/forums/thread/6649.aspx
http://anyrest.wordpress.com/2010/06/28/active-directory-c/
http://elegantcode.com/2009/03/21/one-scenario-where-the-systemdirectoryservices-accountmanagement-api-falls-down/  

Basically, you should ask the network administrator to verify the DNS entries for the domain controllers in your network. It appears that adding the IP address of your domain controller (which you are trying to connect) as the first entry in the DNS server list on the Web server machine also works. More information is available on the URLs I posted above.

4
6/8/2011 11:33:54 AM
26 Reputation 11 Total posts

Brilliant! This works as described!

5
This is a demo site for MonoX. Please visit Mono Software for more info.