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.

Active Directory Intergration Success, But User Profile Error (Closed) (Mono Support )

Viewed 81565 time(s), 6 post(s) 8/26/2011 4:03:48 AMby whitewing

Related topics

whitewing

whitewing

8/26/2011 4:03:48 AM
Hello

Active Directory Intergration Success, I can use AD account Login MonoX.
But User Profile Error. who can tell me where I lost config ?

thanks


See ThisErr Message

The provider user key supplied is invalid. It must be of type System.Security.Principal.SecurityIdentifier.
Parameter name: providerUserKey
This content has not been rated yet. 
105 Reputation 12 Total posts
denis

denis

8/26/2011 7:38:53 AM
Could you please post your web.config file here (you can remove all AD passwords from it)?
This content has not been rated yet. 
7207 Reputation 956 Total posts
whitewing

whitewing

8/27/2011 1:23:44 AM
OK See Attachment. In Order to Security, I remove pwd and modify domain name
This content has not been rated yet. 
105 Reputation 12 Total posts
denis

denis

8/26/2011 1:46:59 PM
Apparently there was an error in the blog post describing the AD integration process, and instead of the MonoX AD membership provider, the default ASP.NET AD provider was used. This is now fixed.
You should change the configuration line for the AD membership provider to this:
<add name="ActiveDirectoryMembershipProvider" type="MonoSoftware.MonoX.ActiveDirectoryMembershipProvider" connectionStringName="ADConnectionString" attributeMapUsername="sAMAccountName" applicationName="MonoX" connectionUsername="MyUsername@mydomain" connectionPassword="MyPassword" />

Of course, you should put your own username and password values.

This content has not been rated yet. 
7207 Reputation 956 Total posts
whitewing

whitewing

8/27/2011 5:11:21 AM
thanks dennis

AD problem is ok. Userprofile is work.

But I have another problem, if I use AD Auth, does my page want to set another privilege (like group)?

Because I met "site wall" page have security exception.



This content has not been rated yet. 
105 Reputation 12 Total posts
denis

denis

8/27/2011 3:04:44 PM
The wall page is set to allow access only for administrators and users in the default "Users" group. As the Users group does not exists in the AD role scheme (actually, it exists, but it is not a security group and cannot be used), it is only a leftover from the standard forms authentication scenario. Since your AD user is not assigned to the correct role, the Security Exception is thrown.

I would recommed that you set the security for all such pages (wall, messaging, etc) in advance, by logging in as administrator. These pages do not work for unauthenticated users - this would not make any sense. You should also add AD admin role (usually "Admins") to the AdministratorRoles setting in web.config.

You can set page view roles in the page management utility in the administrative backend, or via CustomAccessRoles property in code. I don't know what will be your default role for authenticated non-admin users in the AD scenario (DomainUsers?), but in any case it should be added to wall, messages and similar pages.
This content has not been rated yet. 
7207 Reputation 956 Total posts