asp.netwebformsmachinekey

Setting machine key in 2 servers web.config does not resolve error "MAC address validation failed"


We have two servers: one for development purpose and another for test environment, we log each request in development server and replay the logged request on to the test environment server and based on security reason we should not set EnableViewStateMac to false so we must set same machine key on both servers (I mean in each web.config file) but when we want to replay the already captured request in development server on to the test environment server we got the error "MAC address validation failed....". What's wrong??


Solution

  • Finally the issue has been resolved. Solution: the application path in both server must be the same, That is if we logged the request in development server with URI address "localhost/app_path" then the logged request must be replayed on the test environment with URI address "test_server/app_path". "app_path" must be the same in both servers. Thanks.