In order to do this you will have to write your own Profile Provider and then modify the user class to include these profile properties which you can then access.
Have a look at page Section 13.3 of the RIA Services Overview document and let me know if you need any help.
We are just in the middle of implementing a RIA Services application and have written our own custom membership provide and profile provider so let me know if you need a hand.
Вот как я взломал его на AuthenticationService, предоставляемом BusinessApplicationTemplate.
[EnableClientAccess]
public class AuthenticationService : AuthenticationBase<User> {
protected override User GetAuthenticatedUser(System.Security.Principal.IPrincipal principal)
{
User user = base.GetAuthenticatedUser(principal);
Configuration config = WebConfigurationManager.OpenWebConfiguration("~");
SystemWebSectionGroup grp = (SystemWebSectionGroup)config.GetSectionGroup("system.web");
AuthenticationSection auth = grp.Authentication;
if (auth.Mode == AuthenticationMode.Forms)
{
}
else if (auth.Mode == AuthenticationMode.Windows)
{
string[] a = user.Name.Split('\\');
System.DirectoryServices.DirectoryEntry ADEntry = new System.DirectoryServices.DirectoryEntry("WinNT://" + a[0] + "/" + a[1]);
string Name = ADEntry.Properties["FullName"].Value.ToString();
user.Name = Name;
}
return user;
}
}
Привет всем, в MSDN появилась новая статья, сейчас я работаю над ней.
http://msdn.microsoft.com/en-us/library/ee707353 (VS.91) .aspx