Dear IIS Community,
We have 3 servers setup.. Two of which have almost identical IIS configuration and one server which is setup slightly different.
All 3 servers are running the same application however on the two replica's when a person hibernates their PC and re-attempts logon (Say 20 minutes later) one would get a ViewState Error.
This only happens on 2/3 servers.. I've compared the configuration of all three servers and am struggling to find reasoning behind the viewstate errors.
On the two replica (Not clustered, just replica configuration running two separate app instances) servers the below error is generated after the user has hibernated their PC and attempted a page refresh on return:
********** 18/11/2014 22:01:40 **********
Inner Exception Type: System.Web.UI.ViewStateException
Inner Exception: Invalid viewstate.
Client IP: HIDDEN
Port: 61727
Referer: HIDDEN
Path: /WERWER/Loginpage.aspx
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; rv:11.0) like Gecko
ViewState: /wEPDwUJMTU3NDQ3OTA5D2QWAgIDD2QWBgIFDxYCHgRUZXh0BQczLjEuNC4zZAIJDxAPFgIeC18hRGF0YUJvdW5kZ2QPFgICAQICFgIQBQtBc3RyYVplbmVjYQUBMWcQBQtBc3RyYVplbmVjcQUBMmdkZAILDw9kDxAWAWYWARYCHg5QYXJhbWV0ZXJWYWx1ZWQWAQIDZGRkfcrsQ9t3t1viPYtGtlL9zhltvqca0XJ8+sAMNb9FJhc=
Inner Source:
Exception Type: System.Web.HttpException
Exception: 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.
Source: Application_Error - Global.asax
Stack Trace:
at System.Web.UI.ViewStateException.ThrowMacValidationError(Exception inner, String persistedState)
at System.Web.UI.ObjectStateFormatter.Deserialize(String inputString, Purpose purpose)
at System.Web.UI.Util.DeserializeWithAssert(IStateFormatter2 formatter, String serializedState, Purpose purpose)
at System.Web.UI.HiddenFieldPageStatePersister.Load()
at System.Web.UI.Page.LoadPageStateFromPersistenceMedium()
at System.Web.UI.Page.LoadAllState()
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
at System.Web.UI.Page.ProcessRequest()
at System.Web.UI.Page.ProcessRequest(HttpContext context)
at ASP.scairlogin_aspx.ProcessRequest(HttpContext context) in c:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\appdir\405a4e54\e0bdc3da\App_Web_qp5t5y2q.3.cs:line 0
at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
Another Occasion::
********** 16/10/2014 11:29:06 **********
Inner Exception Type: System.Web.UI.ViewStateException
Inner Exception: Invalid viewstate.
Client IP: hidden
Port: 63887
Referer: hidden
Path: HIDDEN
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; rv:11.0) like Gecko
ViewState: /wEPDwUJMTU3NDQ3OTA5D2QWAgIDD2QWBgIFDxYCHgRUZXh0BQczLjEuNC40ZAIJDxAPFgIeC18hRGF0YUJvdW5kZ2QPFgECARYBEAUGU2Fub2ZpBQE1Z2RkAgsPD2QPEBYBZhYBFgIeDlBhcmFtZXRlclZhbHVlZBYBAgNkZGQOSDDVejjm6GAjbB7Ke9jTxN8jwI+kH3Hw9hzBkL2Oug==
Inner Source:
Exception Type: System.Web.HttpException
Exception: 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.
Source: Application_Error - Global.asax
Stack Trace:
at System.Web.UI.ViewStateException.ThrowMacValidationError(Exception inner, String persistedState)
at System.Web.UI.ObjectStateFormatter.Deserialize(String inputString, Purpose purpose)
at System.Web.UI.Util.DeserializeWithAssert(IStateFormatter2 formatter, String serializedState, Purpose purpose)
at System.Web.UI.HiddenFieldPageStatePersister.Load()
at System.Web.UI.Page.LoadPageStateFromPersistenceMedium()
at System.Web.UI.Page.LoadAllState()
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
at System.Web.UI.Page.ProcessRequest()
at System.Web.UI.Page.ProcessRequest(HttpContext context)
at ASP.scairlogin_aspx.ProcessRequest(HttpContext context) in c:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\scair\405a4e54\e0bdc3da\App_Web_uhtljwwn.1.cs:line 0
at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
Could anyone perhaps help ?
Thanks very much!