DataBase and application connect successfully.sometimes can log into web application with providing details. get an error called "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. "
Code:
[ViewStateException: Invalid viewstate.
Client IP: 112.134.47.103
Port: 10091
Referer: https://testorigin.xyz.lk/StaffLogin.aspx
Path: /StaffLogin.aspx
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36
ViewState: iBIlfxyvZMZ8tyv/kpglGOh38/vTCqm2tCzOHzBFaYzN6kqMia09f9KdDEEUV8hq73S5u0LWPcJybEBfB8rLlT6EsYGhKDjVtB8v/kwtEWk=]
[HttpException (0x80004005): 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.
See http://go.microsoft.com/fwlink/?LinkID=314055 for more information.]
System.Web.UI.ViewStateException.ThrowError(Exception inner, String persistedState, String errorPageMessage, Boolean macValidationError) +153
System.Web.UI.ObjectStateFormatter.Deserialize(String inputString, Purpose purpose) +896
System.Web.UI.Util.DeserializeWithAssert(IStateFormatter2 formatter, String serializedState, Purpose purpose) +61
System.Web.UI.HiddenFieldPageStatePersister.Load() +305
System.Web.UI.Page.LoadPageStateFromPersistenceMedium() +367
System.Web.UI.Page.LoadAllState() +46
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +9458
System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +345
System.Web.UI.Page.ProcessRequest() +75
System.Web.UI.Page.ProcessRequest(HttpContext context) +70
System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +790
System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step) +195
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +88