0

We have an application running in 2 web servers hosted in the web farm (F5) in window server 2016, IIS 10. When I have only one server running (stop IIS service in one server), everything works fine, but when both servers are running, it seems like the app pool recycled randomly and caused all session variables lost, it gave me an error "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"

I did try generating machine key instead of using Auto generated key, but it still gave me same error. When I copy same machine key to another web server, this error above went away, but I ran into a sql error when making a call to DB server because session variable holding SQL parameter got lost. The application works perfectly on each web server when it runs by itself, but fails when both servers running.

It seems that app pool keeps recycling in the web farm. App Pool is running under Network Service account. I have tried all suggestion about machine key without any luck. Please let me know what I need to check into. Thank you!

0 Answers0