Hi, @Karthik K V ,
You could try coding as below :
Codes of MyActionFilterAttribute :
public class MyActionFilterAttribute : ActionFilterAttribute
{
public override void OnResultExecuted(ResultExecutedContext filterContext)
{
var setCookieHeaderValues = filterContext.HttpContext.Response.Headers;
var cookies = setCookieHeaderValues["Set-Cookie"];
}
}
Codes of HomeController:
[MyActionFilterAttribute]
public class HomeController : Controller
{
public HomeController()
{
}
public IActionResult Index()
{
Response.Cookies.Append("Test", "hellocookie");
return View();
}
}
Test result:
------
If the answer doesn’t solve your issue, please provide more details of error that will help us track down what’s happening.
If the answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.
Best Regards,
Michael Wang