Thử thêm cái coi lào
Dec 4

Sửa lỗi "Validation of viewstate MAC failed"

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.

At least one time in you life you see this message. And this can be a real  problem... It's infrequent and hard to reproduce this error.
They are saying  something about cluster? I'm on shared hosting... So, why this problem occurs?  

It's hard to find why this error occurs. But let me explain why. IIS can  shutdown your application if there are no request during some time... And this  is because someone just fills big form! (and no other visitors this time). And  when someone submits a long form, he receives this, message. I don't know, maybe  this was a problem only for me. But solution is quite simple! Always use  generated <machineKey>. There are another question... How to generate it?  I've found a tool long time ago...

So, use MachineKey generator http://www.aspnetcafe.com/tools/machineKey.aspx

Maybe this stuff can save you several hours... usually, for beginners in ASP.

 

Vào trang đó, tạo một cái MachineKey (copy cho đúng với bản .Net bạn đang sử dụng nhé). Rồi quay vào web.config thêm đoạn mã machinekey vào là đc

harvest_mouse
28 July 2009 10:39
nhưng biết thêm vào chỗ nào thì chính xác hả bạn?
Phân trang 1/1 Trang đầu 1 Trang cuối