[InvalidCastException: Specified cast is not valid.] / [HttpException: The state information is invalid for this page and might be corrupted.] RRS feed

  • Question

  • I am getting the following issue when I used the SessionPageStatePersister for saving the viewstate data in session. The stack trace does not show the detailed source of the error. What is the general cause for the issue and how can it be resolved?

    [InvalidCastException: Specified cast is not valid.]
    at System.Web.UI.SessionPageStatePersister.Load()

    [HttpException: The state information is invalid for this page and might be corrupted.]
    at System.Web.UI.SessionPageStatePersister.Load()
    at Telerik.Web.UI.RadSessionPageStatePersister.Load()
    at System.Web.UI.Page.LoadPageStateFromPersistenceMedium()
    at System.Web.UI.Page.LoadAllState()
    at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint,\ Boolean includeStagesAfterAsyncPoint)
    at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint,\ Boolean includeStagesAfterAsyncPoint)
    at System.Web.UI.Page.ProcessRequest()
    at System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context)
    at System.Web.UI.Page.ProcessRequest(HttpContext context)
    at ASP.default_aspx.ProcessRequest(HttpContext context)
    at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
    at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

    • Moved by Hasham Niaz Wednesday, December 19, 2012 9:27 AM Moving to more appropriate Forum (From:MSDN, TechNet, and Expression Profile and Recognition System Discussions)
    Wednesday, December 19, 2012 7:15 AM


All replies

  • Might ask them over here.





    Regards, Dave Patrick ....
    Microsoft Certified Professional
    Microsoft MVP [Windows]

    Disclaimer: This posting is provided "AS IS" with no warranties or guarantees , and confers no rights.

    Wednesday, December 19, 2012 10:21 AM
  • Neerajan, we'll need more info.

    If you don't think ASP.net is the right place, you need to tell us why.

    Also, we'll need more info about your technology and context.


    Ed Price (a.k.a User Ed), SQL Server Customer Program Manager (Blog, Twitter, Wiki)

    Thursday, January 10, 2013 4:50 PM