By the way, are running asp 2.0 or which version, is your IP Host running the same and do you have the machineKey hard coded and it's related values specified in your config file if you are running on a web farm or other place where execution kmay be broken between postings? There can be several reasons for this type of message and it would be necessary to actually see the code, config file and perhaps get some info from your IP Host to resolve it without just trying suggested solutions and finding one that works for you, inefficient, slow but perhaps your best bet if you don't have access to an experienced pro in this arena. View State, encryption and all that jazz is one of the more complex issues needed to be delt with in Internet Programming and especially for processing split between processes on diferent machines of a Web Farm or other remote or multi-processing situation.. Anyway, See if you have specified a machineKey and the related fields, properties, in the <system.web> section of your config file - at least I have used one for my Website that works fine with some rather complex nested controls and Master Pages. Make sure you don't have 2 <form> statements in your page, make sure you have it in the Details Page - this according to one of the other posts but I had no problem using it in either the Master nor the Detail Page... Hmmm, I can't think of anything else to look at but you should get some ideas from the prior blog I mentiioned and here. I had to specify a machineKey value when I moved my site up to a IP Host if I remember correctly but that was using VS 2005 and several years ago so I do not recall exactly what all it entailed other than that specification.
Rick USA----- Original Message ----- From: "RicksPlace" <ofbgmail@xxxxxxxxx>
To: <programmingblind@xxxxxxxxxxxxx> Sent: Friday, November 19, 2010 5:30 AM Subject: Re: asp.net problem, viewstate mac
Hi: Did you read the following group of Postings on this subject? It was one of the first ones I found googling and has a little info about folks having that or a similar problem and a response from a MS guy.http://forums.asp.net/t/955145.aspx Rick USA----- Original Message ----- From: "sameer manohtra" <sameermanohtra@xxxxxxxxx>To: <programmingblind@xxxxxxxxxxxxx> Sent: Friday, November 19, 2010 3:44 AM Subject: Re: asp.net problem, viewstate mac well, I read that this is one of the most common problems developer faces specially while working with gridview controls where data is to be sought from database. Wondrously, I couldn’t find anyone amongst the folks I know who has a working solution of this nagging issue. At most of the places, I’ve seen that doing enable viewstate mac “false” fix the issue, but what am I doing wrong, I get runtime error on the page everytime I implement this one line. I’m sure some of you guys must have come across of this problem, as I’m aware that here we have so many experienced developers. Please help me, its muddling my head and I’m just out of solution. Any help will be deeply appreciated and will prove of absolute utility. Sameer! On 11/19/10, Jacques Bosch <jfbosch@xxxxxxxxx> wrote:Perhaps you already read these pages, but anyway. http://blogs.msdn.com/b/tom/archive/2008/03/14/validation-of-viewstate-mac-failed-error.aspx http://www.eukhost.com/forums/f15/fix-validation-viewstate-mac-failed-6085/ On Thu, Nov 18, 2010 at 4:21 PM, sameer manohtra <sameermanohtra@xxxxxxxxx>wrote:Hi guys, I’ve trapped into a problem yet again: I’m developing a website using asp.net and I have encountered a problem where i’d like to know from you guys. I have developed a page where there’s a gridview control that’s showing data from the database, and a textbox and button that stores the value in the database. Its all working fine on my computer (LOCALHOST), but on live server it seemed to have messed up. Simply, when I try to place a text in textbox and click button for add (which should store the data into database), I get this strange error: “Validation of viewstate MAC failed. If this application is hosted by a Web Farm or cluster, ensure that <machineKey> configuration specifies the same validationKey”. from some googling I found that this can be fixed by placing following in web.config: enableViewStateMac="false" viewStateEncryptionMode="Never" enableEventValidation="false" unfortunately, when I’ve added this to my web.config, the page did not load and started giving runtime error. I have even tried to place the same code in .aspx file, result of which too was similar (RunTime Error). Does someone have any solution? Please, share it, I’m in high Need to do the same. Any response will be appreciated. Sameer! __________ View the list's information and change your settings at http://www.freelists.org/list/programmingblind-- Jacques Bosch__________ View the list's information and change your settings at http://www.freelists.org/list/programmingblind __________View the list's information and change your settings at http://www.freelists.org/list/programmingblind
__________View the list's information and change your settings at http://www.freelists.org/list/programmingblind