The project is ASP.NET 2.0, I have never been able to reproduce this myself, but I get emails informing me it happens to clients many times a week, often a few times in a row.>
We had the same problem. So far, we only found it when the session expired but they used the back button in a browser that does aggressive caching, which is fine. But the ReportViewer tried to to a refresh even though the main page did not. So, we just added some hacky Global.asax error handling:
protected void Application_Error(object sender, EventArgs e)
{
Exception exc = Server.GetLastError().GetBaseException();
if (exc is Microsoft.Reporting.WebForms.AspNetSessionExpiredException)
{
Server.ClearError();
Response.Redirect(FormsAuthentication.LoginUrl + "?ReturnUrl=" + HttpUtility.UrlEncode(Request.Url.PathAndQuery), true);
}
}