Reputation: 289
I am getting the error in the title above from this line of code:
HttpCookie authCookie = Context.Request.Cookies[cookieName];
Is there something I forgot to use ?
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using System.Web.Security;
using System.Security.Principal;
Upvotes: 6
Views: 9939
Reputation: 33815
If you are in the context of a controller, you should be using HttpContext
.
HttpCookie authCookie = HttpContext.Request.Cookies[cookieName];
Upvotes: 4