MonoX support board

Start the conversation, ask questions and share tips and solutions with fellow developers.

Non-registered users can only browse through our support boards. Please register now if you want to post your questions. It takes a second and it is completely free. Alternatively, you can log in without registration using your credentials at major sites such as Google, Microsoft Live, OpenId, Facebook, LinkedIn or Yahoo.

ActiveDirectory integration  (Mono Support )

Viewed 32477 time(s), 5 post(s) 6/8/2011 11:19:47 AMby JoeUser
JoeUser

JoeUser

6/8/2011 11:19:47 AM
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?



This content has not been rated yet. 
26 Reputation 11 Total posts
denis

denis

6/8/2011 11:21:55 AM
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.
This content has not been rated yet. 
7207 Reputation 956 Total posts
JoeUser

JoeUser

6/8/2011 11:22:51 AM
Thanks Denis, I just sent a private message to you.
This content has not been rated yet. 
26 Reputation 11 Total posts
denis

denis

6/8/2011 11:30:40 AM
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.
Rated 5.00, 1 vote(s). 
7207 Reputation 956 Total posts
JoeUser

JoeUser

6/8/2011 11:33:54 AM
Brilliant! This works as described!
This content has not been rated yet. 
26 Reputation 11 Total posts