刚刚开始掌握 WCF 安全性。如何在服务中列出用户的角色?
例如
// Could use declarative security here, i.e. using PrincipalPermission attribute
public string MyService()
{
// Would like some code that does something like:
foreach( Role role in CurrentUser.Roles )
{
}
}
谢谢