The name 'DefaultAuthenticationTypes' does not exist in the current context
For the first, it is just a constant string
If you do not want to install packages the quickest ( and not very orthodox ) solution is
ClaimsIdentity identity = new ClaimsIdentity("ApplicationCookie");
you can see definition here
DefaultAuthenticationTypes
is part of Identity framework and found in Microsoft.AspNet.Identity
namespace.
To use it, add a using
to the top of the file
using Microsoft.AspNet.Identity;
//...other code
identity = new ClaimsIdentity(DefaultAuthenticationTypes.ApplicationCookie);
or call it directly
identity = new ClaimsIdentity(Microsoft.AspNet.Identity.DefaultAuthenticationTypes.ApplicationCookie);
The second issue was already dealt with in another one of your questions here