Prevent redirect to /Account/Login in asp.net core 2.2

The behaviour you experience is linked to the fact that you use ASP.NET Identity. When you call services.AddIdentity, behind the scenes a cookie-based authentication scheme is registered and set as the default challenge scheme, as you can see in the code here on GitHub. Even though you registered a cookie authentication scheme yourself and set … Read more

Asp.Net core Tempdata and redirecttoaction not working

TempData uses Session, which itself uses IDistributedCache. IDistributedCache doesn’t have the capability to accept objects or to serialize objects. As a result, you need to do this yourself, i.e.: TempData[“PopupMessages”] = JsonConvert.SerializeObject(_popupMessages); Then, of course, after redirecting, you’ll need to deserialize it back into the object you need: TempData[“PopupMessages”] = JsonConvert.DeserializeObject<List<PopupMessage>>(TempData[“PopupMessages”].ToString());

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)