Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
User.Identity.NameASP.NET MVC 4 では、との違いは何 WebSecurity.CurrentUserNameですか? 互換的に使用できますか?
User.Identity.Name
WebSecurity.CurrentUserName
リフレクターの礼儀:
public static class WebSecurity { ... public static string CurrentUserName { get { return Context.User.Identity.Name; } } ... }
それでは、あなたの質問に答えましょう:
User.Identity.Nameとはどう違いWebSecurity.CurrentUserNameますか?
なし。
互換的に使用できますか?
はい。