Archive for category ASP.Net

Validation of viewstate MAC failed.

A very popular error, so popular and in so many places still unresolved. I spent a while trying to track down what was causing this error on my new hosting environment. I felt it would be a great idea to go ahead and repost my successful solution. I first did a hefty bit of searching on Google of course. Going through dozens of blogs and forums that seemed to all have similar answers for how to solve it. Turn off event validation they would say! Everything I read on that was telling me it would be a security nightmare to have a public application with page validateRequest=”false” enableEventValidation=”false” viewStateEncryptionMode=”never” in your web config file. I tried it anyway and I still got “Validation of viewstate MAC failed.” and I was so frustrated!

I kept searching until I found http://www.developmentnow.com/articles/machinekey_generator.aspx that generated a machine key and the xml required for my web config file. I put that in there an set the page attribute enableViewStateMac to true and uploaded my changes. I waited, 5 minutes no error, 5 hours no error, 24 hours no error. I exclaimed with joy when I could refresh my free online dating search page after being idle a while and not see that terrible error. I hope this helps out someone else as I spent way to long tracking down an answer to this problem.

7 Comments

DiveIntoThePool.com free online dating site launched!

This main page is practically a launch announcement site at this point. It’s been a long hard road to launching DiveIntoThePool.com and I’ve so far met all my goals I set out to when beginning development on the site. It was in a language I’ve never used, ASP.Net in C#. On a platform I didn’t know, Windows and IIS hosting. It gave me more experience in designing database driven applications and I started completely fresh on MSSQL as well. It’s been over a year and a half since I started this and I feel so great having designed, developed, managed and launched this project finally. Now the fun begins. From here on in I’ve got to use everything I know about SEO and marketing techniques to promote my new website as I refuse to let it become dormant as I’ve seen so many dating sites do. I’ve setup a blog for the site as well to talk about things that are specific to that project. You can follow the project on twitter, Facebook or MySpace too! Let me know what you think of the new site or if you create a profile!

No Comments