Re: asp.net problem, viewstate mac

  • From: sameer manohtra <sameermanohtra@xxxxxxxxx>
  • To: programmingblind@xxxxxxxxxxxxx
  • Date: Fri, 19 Nov 2010 14:14:17 +0530

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
>> //www.freelists.org/list/programmingblind
>>
>>
>
>
> --
> Jacques Bosch
>
__________
View the list's information and change your settings at
//www.freelists.org/list/programmingblind

Other related posts: