Asp.net Session lost redirect from payment gateway Samesite in chrome -MVC
Easiest solution for Asp.net Session lost when redirect payment gateway Samesite with cookies Chrome and asp.net,mvc,.net core

when we redirect from any third party url or load balancing server
payment gateway site,losing Asp.net session in google chrome browser
this is because of latest update of chrome will not support samesite None
solution is
SessionStateSection sessionStateSection = (SessionStateSection)ConfigurationManager.GetSection("system.web/sessionState");
string sessionCookieName;
if (sessionStateSection != null)
{
//read the name from the configuration
sessionCookieName = sessionStateSection.CookieName;
}
else
{
sessionCookieName = "ASP.NET_SessionId";
}
Response.Cookies[sessionCookieName].Path += ";SameSite=None";