HTTP MODULE Event Does Not Fire When Click Browser's Back Button
- by Ali
I Wrote an Http Module that checks if logged user is restricted disables images on the page.
void application_AuthorizeRequest(object sender, EventArgs e)
{
.
.
.
if (context.User.IsInRole("Restricted"))
{
context.Response.StatusCode = 401;
context.Response.End();
}
The code works fine. When the page loads, every image on the screen disapears. but when I go to another page and click back button on the browser and goto previous page images appear.
What should I?
(I dont want to clear Cache every time)
context.Response.Cache.SetNoStore();
context.Response.Cache.SetCacheability(HttpCacheability.NoCache);