Invalid ViewState Error

Posted on 2011-10-14
Last Modified: 2012-05-12
I'm running IIS 7.0, and .NET 3.5.  My pages will randomly receive the error below.  I have a ScriptManager running on a MasterPage, and and ScriptManagerProxy running on all the pages that use it.  The error will be received several times in a row throughout the day, then I may not see it for days.  The last couple of times it happened after making an update to the site, but that's not always the case.  The error happens on different browsers as well. Is there an easy way to trace it to where the error actually happened?
System.Web.HttpException: Invalid viewstate. at System.Web.UI.Page.DecryptStringWithIV(String s, IVType ivType) at System.Web.UI.Page.DecryptString(String s) at System.Web.Handlers.ScriptResourceHandler.DecryptParameter(NameValueCollection queryString) at System.Web.Handlers.ScriptResourceHandler.ProcessRequestInternal(HttpResponse response, NameValueCollection queryString, VirtualFileReader fileReader) at System.Web.Handlers.ScriptResourceHandler.ProcessRequest(HttpContext context) at System.Web.Handlers.ScriptResourceHandler.System.Web.IHttpHandler.ProcessRequest(HttpContext context) at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

Open in new window

Question by:dxproz232
    LVL 16

    Expert Comment

    by:Easwaran Paramasivam
    LVL 15

    Expert Comment

    add enableviewstatmac="false" to pages element in the web config

    Author Comment

    Looking at that document EaswaranP... Eval we need the viewstate as we use it in the code...
    LVL 15

    Accepted Solution

    didn't wrote EnableViewState = false

    EnableViewStateMac - Gets or sets a value indicating whether ASP.NET should run a message authentication check (MAC) on the page's view state when the page is posted back from the client.


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    Running classic asp applications under Windows Server 2008 R2 (x64) and IIS 7 is not as easy as one may think. It took me a while to figure it out while getting error 8002801d a few times. After you install the OS you will need to install the fol…
    Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
    It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
    In this sixth video of the Xpdf series, we discuss and demonstrate the PDFtoPNG utility, which converts a multi-page PDF file to separate color, grayscale, or monochrome PNG files, creating one PNG file for each page in the PDF. It does this via a c…

    737 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    20 Experts available now in Live!

    Get 1:1 Help Now