Important Notice from AspDotNetStorefront
It is with dismay that we report that we have been forced, through the action of hackers, to shut off write-access to this forum. We are keen to leave the wealth of material available to you for research. We have opened a new forum from which our community of users can seek help, support and advice from us and from each other. To post a new question to our community, please visit: http://forums.vortx.com
Results 1 to 10 of 10

Thread: Validation Of Viewstate MAC Failed Error Message

  1. #1
    rtomer is offline Member
    Join Date
    Jan 2010
    Posts
    39

    Default Validation Of Viewstate MAC Failed Error Message

    Hello everyone,

    I have tried to call addtocart.aspx while adding a product in shoppingcart but it throws an error as
    Validation Of Viewstate MAC

    System logs shows nothing,
    I have updated the machinekey in web.config
    and also tried setting <pages enableeventvalidation="false"
    viewstateencryptionmode="Never">

    but nothing works.

    Please help.

  2. #2
    ASPAlfred is offline Senior Member
    Join Date
    Nov 2007
    Posts
    2,244

    Default

    Check this out.

  3. #3
    rtomer is offline Member
    Join Date
    Jan 2010
    Posts
    39

    Default

    I have already tried that but doesn't help.
    Any other suggestion ??

  4. #4
    rtomer is offline Member
    Join Date
    Jan 2010
    Posts
    39

    Default

    Hello everyone,

    As i was struggling to resolve the above said issue, when I modified web.config as
    <pages validateRequest="false" .....>

    it works for me

    but as we know we can't have validateRequest="false" so there should be some other way around for it.

    Please suggest. . .

  5. #5
    rtomer is offline Member
    Join Date
    Jan 2010
    Posts
    39

    Default

    as I said earlier we can't set validateRequest="false"
    so I have to look around for another solution as by making validateRequest="false"
    admin panel for the aspdotnetstorefront v9 crashes



    another bad start of the day

    please help me!!
    --
    Reetika Tomer
    (MCTS , MCPD)
    Sr. Software Engineer
    Daffodil Software Ltd

  6. #6
    ASPAlfred is offline Senior Member
    Join Date
    Nov 2007
    Posts
    2,244

    Default

    'Validation Of Viewstate MAC Failed' error is pretty much common here in the forum. If you search the forum using the keyword 'Viewstate', all of the matching threads were given the same article and it worked for them pretty well.

    I was wondering if you could provide us the stack trace of the error? You aren't using a web farm? What version of ASP.NET or perhaps AspDotNetStorefront version are you on?

  7. #7
    rtomer is offline Member
    Join Date
    Jan 2010
    Posts
    39

    Default

    yes it is pretty common until you faced it

    I have gone through almost all of the matching threads ,but not much helped any except setting validateRequest="false"

    but that I can't

    yes i am not using farm, actually its on localhost till now
    and I using ML version 9.0.1.3


    here is the stack trace for the exception:
    ---------------------------------------------------------------------
    [HttpException (0x80004005): Unable to validate data.]
    System.Web.Configuration.MachineKeySection.GetDeco dedData(Byte[] buf, Byte[] modifier, Int32 start, Int32 length, Int32& dataLength) +289
    System.Web.UI.ObjectStateFormatter.Deserialize(Str ing inputString) +140

    [ViewStateException: Invalid viewstate.
    Client IP: 127.0.0.1
    Port: 2084
    User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.12) Gecko/20101026 Firefox/3.6.12
    ViewState: /wEPDwULLTE2NDI5NzQwNDMPZBYCZg9kFgQCAg9kFgQCAw8WAh4 HY29udGVudAUFY2FyZDFkAgQPFgIfAAUFY2FyZDFkAgYPFgIeB mFjdGlvbgUrc2hvd1Byb2R1Y3QuYXNweD9TRU5hbWU9Y2FyZDE mUHJvZHVjdElEPTIwMxYEAgcPFgIeBFRleHQFgQE8c3BhbiBjb GFzcz0iU2VjdGlvblRpdGxlVGV4dCI+PGEgY2xhc3M9IlNlY3R pb25UaXRsZVRleHQiIGhyZWY9Ii9wY3ByaW50bmV3L2MtMzQtZ mVhdHVyZWQuYXNweCI+RmVhdHVyZWQ8L2E+ICZyYXJyOyBjYXJ kMTwvc3Bhbj5kAggPZBYCAgEPZBYCAgEPFgIfAgXtHTwhLS0gW G1sUGFja2FnZTogcHJvZHVjdC5wcm9kdWN0d2l0aGV4dGVuc2l vbmRhdGEueG1sLmNvbmZpZyAtLT4KPCEtLUNvcHlyaWdodCAxO Tk1LTIwMTAgQXNwRG90TmV0U3RvcmVmcm9udC5jb20tLT48ZGl 2IHN0eWxlPSJjbGVhcjpib3RoOyIgeG1sbnM6cGNwcmludD0id XJuOnBjcHJpbnQiPjwvZGl2Pg0KPGRpdiB4bWxuczpwY3ByaW5 0PSJ1cm46cGNwcmludCI+PGlucHV0IHR5cGU9ImhpZGRlbiIgb mFtZT0iaGRuRXh0ZW5zaW9uRGF0YSIgdmFsdWU9IiZhbXA7bHQ 7RXh0ZW5zaW9uRGF0YSZhbXA7Z3Q7JmFtcDtsdDtGSUVMRFMuQ WRkcmVzc0xpbmUxJmFtcDtndDtzdW5jaXR5JmFtcDtsdDsvRkl FTERTLkFkZHJlc3...]

    [HttpException (0x80004005): Validation of viewstate MAC failed. If this application is hosted by a Web Farm or cluster, ensure that <machineKey> configuration specifies the same validationKey and validation algorithm. AutoGenerate cannot be used in a cluster.]
    System.Web.UI.ViewStateException.ThrowError(Except ion inner, String persistedState, String errorPageMessage, Boolean macValidationError) +106
    System.Web.UI.ViewStateException.ThrowMacValidatio nError(Exception inner, String persistedState) +14
    System.Web.UI.ObjectStateFormatter.Deserialize(Str ing inputString) +242
    System.Web.UI.ObjectStateFormatter.System.Web.UI.I StateFormatter.Deserialize(String serializedState) +4
    System.Web.UI.Util.DeserializeWithAssert(IStateFor matter formatter, String serializedState) +37
    System.Web.UI.HiddenFieldPageStatePersister.Load() +207
    System.Web.UI.Page.LoadPageStateFromPersistenceMed ium() +105
    System.Web.UI.Page.LoadAllState() +43
    System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +6785
    System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +242
    System.Web.UI.Page.ProcessRequest() +80
    System.Web.UI.Page.ProcessRequestWithNoAssert(Http Context context) +21
    System.Web.UI.Page.ProcessRequest(HttpContext context) +49
    ASP.addtocart_aspx.ProcessRequest(HttpContext context) +37
    System.Web.CallHandlerExecutionStep.System.Web.Htt pApplication.IExecutionStep.Execute() +181
    System.Web.HttpApplication.ExecuteStep(IExecutionS tep step, Boolean& completedSynchronously) +75
    --
    Reetika Tomer
    (MCTS , MCPD)
    Sr. Software Engineer
    Daffodil Software Ltd

  8. #8
    rtomer is offline Member
    Join Date
    Jan 2010
    Posts
    39

    Default

    any updates or suggestions for me ??
    --
    Reetika Tomer
    (MCTS , MCPD)
    Sr. Software Engineer
    Daffodil Software Ltd

  9. #9
    ASPAlfred is offline Senior Member
    Join Date
    Nov 2007
    Posts
    2,244

    Default

    Can you please send this to support? thanks

  10. #10
    rocketTendon is offline Junior Member
    Join Date
    May 2010
    Posts
    2

    Default Huge pet peave

    Was this issue ever "sent to support"? If so, and it was fixed... please post the solution.