Quantcast
Channel: ASP.NET Core
Viewing all articles
Browse latest Browse all 9386

Get Cookie value or Check if Cookie is exist?

$
0
0

Hi folks,
I am using Asp.net core

In login function Controller:

var claims = new List<Claim>
{
    new Claim(ClaimTypes.Name, model.Username)
};

var userIdentity = new ClaimsIdentity(claims,"login");

ClaimsPrincipal principal = new ClaimsPrincipal(userIdentity);

await HttpContext.Authentication.SignInAsync("CookieAuthentication", principal);


How to get cookie value or check if cookie is exist?

Waiting for your response. 

Thanks in Advance!


Viewing all articles
Browse latest Browse all 9386

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>