title: The name 'DefaultAuthenticationTypes' does not exist in the current context
body: <p>I'm trying to implement role-based authorization in my web application like following:</p>
  
  <pre><code>[HttpPost]
  [ActionName("Login")]
  public ActionResult Login(LoginViewModel model)
  {
      if (ModelState.IsValid)
      {
          string userName = model.Username;
          string[] userRoles = (string[])Session["UserRoles"];
  
          ClaimsIdentity identity = new ClaimsIdentity(DefaultAuthenticationTypes.ApplicationCookie);
  
          identity.AddClaim(new Claim(ClaimTypes.NameIdentifier, userName));
  
          userRoles.ToList().ForEach((role) =&gt; identity.AddClaim(new Claim(ClaimTypes.Role, role)));
  
          identity.AddClaim(new Claim(ClaimTypes.Name, userName));
  
          AuthenticationManager.SignIn(identity);
  
          return RedirectToAction("Success");
      }
      else
      {
          return View("Login",model);
      }
  }
  </code></pre>
  
  <p>I'm getting an error on two lines:</p>
  
  <pre><code>1.ClaimsIdentity identity = new ClaimsIdentity(DefaultAuthenticationTypes.ApplicationCookie);
  </code></pre>
  
  <p>And: </p>
  
  <pre><code>2.AuthenticationManager.SignIn(identity);
  </code></pre>
  
  <p>The error 1:</p>
  
  <pre><code>the name 'DefaultAuthenticationTypes' does not exist in the current context
  </code></pre>
  
  <p>And error 2 is:</p>
  
  <pre><code>Authentication manager does not contains definition for SignIn
  </code></pre>
  
  <p>I was trying to find a solution how to implement this but I couldn't find anything related to the errors.</p>