Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. Validation of viewstate MAC failed..

Validation of viewstate MAC failed..

Scheduled Pinned Locked Moved ASP.NET
visual-studiodesignagentic-aialgorithmsdata-structures
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • I Offline
    I Offline
    IamAmit
    wrote on last edited by
    #1

    Hello friends, I got this error in my application. What went wrong..and how to resolve it..I am using vs 2005.. Validation of viewstate MAC failed. If this application is hosted by a Web Farm or cluster, ensure that configuration specifies the same validationKey and validation algorithm. AutoGenerate cannot be used in a cluster. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.Web.HttpException: Validation of viewstate MAC failed. If this application is hosted by a Web Farm or cluster, ensure that configuration specifies the same validationKey and validation algorithm. AutoGenerate cannot be used in a cluster. Source Error: [No relevant source lines] Source File: App_Web_adminlogin.aspx.4e1cade6.fhtclyxp.0.cs Line: 0 Stack Trace: [HttpException (0x80004005): Unable to validate data.] System.Web.Configuration.MachineKeySection.GetDecodedData(Byte[] buf, Byte[] modifier, Int32 start, Int32 length, Int32& dataLength) +2549708 System.Web.UI.ObjectStateFormatter.Deserialize(String inputString) +214 [ViewStateException: Invalid viewstate. Client IP: 10.8.6.6 Port: 1268 User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8.1.7) Gecko/20070914 Firefox/2.0.0.7 ViewState: /wEPDwULLTE1NjYxMDU5OTgPZBYCAgMPZBYCAg0PDxYCHgdWaXNpYmxlaGRkZO2e2+a2WhZCITPLB7L6SRRWmvRV Referer: http://watergenie.ca/test/webmaster/adminlogin.aspx Path: /test/webmaster/adminlogin.aspx] [HttpException (0x80004005): Validation of viewstate MAC failed. If this application is hosted by a Web Farm or cluster, ensure that configuration specifies the same validationKey and validation algorithm. AutoGenerate cannot be used in a cluster.] System.Web.UI.ViewStateException.ThrowError(Exception inner, String persistedState, String errorPageMessage, Boolean macValidationError) +116 System.Web.UI.ObjectStateFormatter.Deserialize(String inputString) +251 System.Web.UI.ObjectStateFormatter.System.Web.UI.IStateFormatter.Deserialize(String serializedState) +4 System.Web.UI.Util.DeserializeWithAssert(IStateFormatter formatter, String serializedState) +37 System.Web.UI.HiddenFieldPageStatePersister.Load() +220 System.Web.UI.Page.LoadPageStateFromPersistenceMedium() +83 System.Web.UI.Page.LoadAllState() +35 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBe

    D 1 Reply Last reply
    0
    • I IamAmit

      Hello friends, I got this error in my application. What went wrong..and how to resolve it..I am using vs 2005.. Validation of viewstate MAC failed. If this application is hosted by a Web Farm or cluster, ensure that configuration specifies the same validationKey and validation algorithm. AutoGenerate cannot be used in a cluster. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.Web.HttpException: Validation of viewstate MAC failed. If this application is hosted by a Web Farm or cluster, ensure that configuration specifies the same validationKey and validation algorithm. AutoGenerate cannot be used in a cluster. Source Error: [No relevant source lines] Source File: App_Web_adminlogin.aspx.4e1cade6.fhtclyxp.0.cs Line: 0 Stack Trace: [HttpException (0x80004005): Unable to validate data.] System.Web.Configuration.MachineKeySection.GetDecodedData(Byte[] buf, Byte[] modifier, Int32 start, Int32 length, Int32& dataLength) +2549708 System.Web.UI.ObjectStateFormatter.Deserialize(String inputString) +214 [ViewStateException: Invalid viewstate. Client IP: 10.8.6.6 Port: 1268 User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8.1.7) Gecko/20070914 Firefox/2.0.0.7 ViewState: /wEPDwULLTE1NjYxMDU5OTgPZBYCAgMPZBYCAg0PDxYCHgdWaXNpYmxlaGRkZO2e2+a2WhZCITPLB7L6SRRWmvRV Referer: http://watergenie.ca/test/webmaster/adminlogin.aspx Path: /test/webmaster/adminlogin.aspx] [HttpException (0x80004005): Validation of viewstate MAC failed. If this application is hosted by a Web Farm or cluster, ensure that configuration specifies the same validationKey and validation algorithm. AutoGenerate cannot be used in a cluster.] System.Web.UI.ViewStateException.ThrowError(Exception inner, String persistedState, String errorPageMessage, Boolean macValidationError) +116 System.Web.UI.ObjectStateFormatter.Deserialize(String inputString) +251 System.Web.UI.ObjectStateFormatter.System.Web.UI.IStateFormatter.Deserialize(String serializedState) +4 System.Web.UI.Util.DeserializeWithAssert(IStateFormatter formatter, String serializedState) +37 System.Web.UI.HiddenFieldPageStatePersister.Load() +220 System.Web.UI.Page.LoadPageStateFromPersistenceMedium() +83 System.Web.UI.Page.LoadAllState() +35 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBe

      D Offline
      D Offline
      DavidNohejl
      wrote on last edited by
      #2

      Obvious question: do you have a web farm? If yes, do what exception message says. If not, it can be caused by someone (bot) acessing your site with cached (therefore probably invalid) viewstate.


      [My Blog]
      "Visual studio desperately needs some performance improvements. It is sometimes almost as slow as eclipse." - RĂ¼diger Klaehn
      "Real men use mspaint for writing code and notepad for designing graphics." - Anna-Jayne Metcalfe

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups