blog posts

What is Windows Hosting and Linux Hosting Services

How to fix ASP.NET error – Validation of ViewState MAC Failed

When hosting your ASP.NET applications on Windows Web Hosting server, your website may face a common error usually when you Submit a Form on your website like a Contact Form or a Registration Form. The error will read like below.
“Validation of viewstate MAC failed. If this application is hosted by a Web Farm or cluster, ensure that configuration specifies the same validationKey and validation algorithm. AutoGenerate cannot be used in a cluster”

viewstate

To get rid of this error in your application, please add the below code to your web.config file to solve the validation of viewstate mac issue. Please note that most probably there must be already a and element in your web.config file so just add the attribute enableViewStateMac to start of element. If issue still persists, then please also add below to your web.config file.

We hope this helps.

Today's Exclusive Deals - Don’t Miss Out!

🌟 YEAR-END DEALS YOU DON’T WANT TO MISS 🌟

Limited-Time Discounts on
Popular Hosting Plans

🎁 The Double-Celebration Flash Sale🛍️
✨ Celebrate our anniversary and 🔥
💥 your New Year goals 🛍️

Huge savings on VPS & shared hosting
FREE domain with selected plans
Faster load speeds & premium performance

🎉 Free Plesk / cPanel 🎉
🎉 Free Domain Name for Lifetime 🎉
🎉 Flat ₹1499 OFF on All Plans 🎉

Days :
Hours :
Minutes :
Seconds