2011-05-12 8 views

답변

2

당신은 User.Identity.Name를 사용해야합니다

[Authorize] 
public ActionResult Foo() 
{ 
    // If we got so far it means that the user is authorized to 
    // execute this action according to our configuration => 
    // we can work with his username 
    string username = User.Identity.Name; 
    ... 
} 
+2

대기, 난 Identity.Name에 관계없이 가장이 활성화되어 있는지의 여부를 사용자의 이름이 확실 해요. –