When mounted as a middleware it sets 4 headers, disabling many browser caching. This is often the entire list of the updated headers. Following redirecting on ActionFilterAttribute celebration the consequences of clearing all headers are dropping all session facts and information in TempData storage. It is safer to redirect from https://socialicus.com/story6465230/%E4%BB%AE%E6%83%B3%E9%80%9A%E8%B2%A8%E3%82%AB%E3%82%B8%E3%83%8E-%E3%81%8A%E3%81%99%E3%81%99%E3%82%81-an-overview