1
Answer

validation of viewstate mac failed on hosted app

Danish Habib

Danish Habib

10y
576
1
I have  a web application which  is hosted on some hosting server and  i am using the viewstate as well as session objects both in my application  , I am getting  that error randomly on some pages "validation of viewstate mac failed if this application is hosted" i want to use the viewstate any solution please refer.




Kind Regards
Danish Habib
spober_woh@yahoo.com
Answers (1)
0
Menardo Espectacion

Menardo Espectacion

NA 16 6.4k 13y
That's a nice alternative... But I don't think I can apply that on our application right now since the requirements didnt allow a lot of development time. I can propose that on our next version maybe... Thanks for your suggestion...
0
Suthish Nair

Suthish Nair

NA 31.7k 4.6m 13y
Why like this.. First give users a "Search" facility for item. If found ask to update (Change button text to "Update") or else create a new one (Change button text to "Add New"). Something like this :)
0
Menardo Espectacion

Menardo Espectacion

NA 16 6.4k 13y
Hi, 

Thanks for the comments... The requirement was quite a rush so I just did a work around. I used two buttons alternating their visibility on every post back depending on the result of the checking for the records existence... If the record doesn't exist, the Add button is visible. Otherwise, the update button is visible. The update is attached with attribute that calls on a client side script that asks the user for confirmation.
0
Suthish Nair

Suthish Nair

NA 31.7k 4.6m 13y
query resolved?
0
Mayur  Gujrathi

Mayur Gujrathi

NA 4.3k 725.6k 13y
 if (MessageBox.Show("Do You Wish To continue", "Confirmation", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
                {
                        MessageBo.Show("yes pressed");
                 }
      
0
Sam Hobbs

Sam Hobbs

NA 28.7k 1.3m 13y
Have you looked at the articles in this web site? Especially the ones listed under "Our recommended articles" at the right side of this window?