mei*_*lke 2 c# authentication authorization asp.net-mvc-4
我是ASP.NET MVC的新手,我经常遇到以下代码:
[Authorize]
public ActionResult Index()
{
if (Request.IsAuthenticated)
// ...
}
Run Code Online (Sandbox Code Playgroud)
if语句真的有必要吗?有人可以解释两者之间的差异吗?
| 归档时间: |
|
| 查看次数: |
810 次 |
| 最近记录: |