ユーザーの UserId にアクセスする必要があるため、これは user.shared と AuthenticationService を拡張することで実行できると思います。クライアント側で UserId (「Guid」) にアクセスすることが私の目標ですが、デフォルトではこれは不可能です。
@ User.shared 次の行を追加しました。
/// <summary>
/// Gets the UserId of the user.
/// </summary>
public Guid UserId { get; private set; }
ここに AuthenticationService クラス - UserId を返すためにここに何を挿入する必要がありますか??
[EnableClientAccess]
public class AuthenticationService : AuthenticationBase<User>
{
//adapt GetAuthenticatdUser in order to be able to retrieve the UserId @ the client !
protected override User GetAuthenticatedUser(System.Security.Principal.IPrincipal principal)
{
return base.GetAuthenticatedUser(principal);
//what does this line above actually do ?!!?
//INSERT statement which returns the UserId (Guid)
}
}
皆さん、THX - このトピックですでに少なくとも 1 時間は無駄にしています :-(.