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

Viewed 84396 time(s), 6 post(s), 8/26/2011 4:03:48 AM - by whitewing
8/26/2011 4:03:48 AM
105 Reputation 12 Total posts

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

1
8/26/2011 7:38:53 AM
7207 Reputation 956 Total posts

Could you please post your web.config file here (you can remove all AD passwords from it)?

2
8/27/2011 1:23:44 AM
105 Reputation 12 Total posts

OK See Attachment. In Order to Security, I remove pwd and modify domain name

3
8/26/2011 1:46:59 PM
7207 Reputation 956 Total posts

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.

4
8/27/2011 5:11:21 AM
105 Reputation 12 Total posts

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.



5
8/27/2011 3:04:44 PM
7207 Reputation 956 Total posts

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.

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