1 namespace System.Web.Mvc { 2 3 public class HttpUnauthorizedResult : HttpStatusCodeResult { 4 5 // HTTP 401 is the status code for unauthorized access. Other code might 6 // intercept this and perform some special logic. For example, the 7 // FormsAuthenticationModule looks for 401 responses and instead redirects 8 // the user to the login page. 9 private const int UnauthorizedCode = 401; 10 HttpUnauthorizedResult()11 public HttpUnauthorizedResult() 12 : this(null) { 13 } 14 HttpUnauthorizedResult(string statusDescription)15 public HttpUnauthorizedResult(string statusDescription) 16 : base(UnauthorizedCode, statusDescription) { 17 } 18 } 19 } 20