we've been getting complaints lately about people having trouble logging in and getting the following 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.
it seems to come and go and doens't have a defined pattern. the only feature we are using in the dynamic login is to redirect to a page by role.
If I login again, it's fine...it doesn't happen every time and occurs on every role group.
the exact error logged in DNN event log is:
AssemblyVersion: 5.5.0
PortalID: 0
PortalName: xxxxxxxxxx
UserID: 46
UserName: monteithco.com
ActiveTabID: 213
ActiveTabName: Login
RawURL: /Login/tabid/213/Default.aspx?returnurl=%2fdefault.aspx
AbsoluteURL: /Default.aspx
AbsoluteURLReferrer: http://xxxxxxxxxxxxxxxxxxxx/Login/t...fault.aspx
UserAgent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; Trident/4.0; SLCC1; .NET CLR 2.0.50727; Media Center PC 5.0; .NET CLR 1.1.4322; .NET CLR 3.5.30729; .NET CLR 3.0.30729; .NET4.0C; OfficeLiveConnector.1.5; OfficeLivePatch.1.3)
DefaultDataProvider: DotNetNuke.Data.SqlDataProvider, DotNetNuke.SqlDataProvider
ExceptionGUID: ed46a3c7-7d34-4ff9-9a62-eb18ffbfef96
InnerException: 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.
FileName:
FileLineNumber: 0
FileColumnNumber: 0
Method: System.Web.Configuration.MachineKeySection.GetDecodedData
StackTrace:
Message: DotNetNuke.Services.Exceptions.PageLoadException: 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. ---> System.Web.HttpException: 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. ---> System.Web.UI.ViewStateException: Invalid viewstate. Client IP: 65.15.108.234 Port: 14548 User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; Trident/4.0; SLCC1; .NET CLR 2.0.50727; Media Center PC 5.0; .NET CLR 1.1.4322; .NET CLR 3.5.30729; .NET CLR 3.0.30729; .NET4.0C; OfficeLiveConnector.1.5; OfficeLivePatch.1.3) ViewState: /wEPDwULLTE2NDIyOTEzMjkPZBYGZg8WAh4EVGV4dAV5PCFET0NUWVBFIGh0bWwgUFVCTElDICItLy9XM0MvL0RURCBYSFRNTCAxLjAgVHJhbnNpdGlvbmFsLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL1RSL3hodG1sMS9EVEQveGh0bWwxLXRyYW5zaXRpb25hbC5kdGQiPmQCAQ9kFg4CBA8WAh4HVmlzaWJsZWhkAgUPFgQeB2NvbnRlbnRkHwFoZAIGDxYEHwJkHwFoZAIHDxYCHwIFOUNvcHlyaWdodCAoYykgMjAxMCBieSBNb250ZWl0aCBDb25zdHJ1Y3Rpb24gQ29ycCBJbnRyYW5ldGQCCA8WBB8CZB8BaGQCCQ8WAh8CBSNNb250ZWl0aCBDb25zdHJ1Y3Rpb24gQ29ycCBJbnRyYW5ldGQCDA8WAh8CBQ1JTkRFWCwgRk9MTE9XZAICD2QWAgIBD2QWBmYPZBYCZg8WAh8BaBYCZg9kFgJmD2QWBgIDDxBkZBYAZAIPD2QWAmYPDxYGHghJbWFnZVVybAUUL2ltYWdlcy9jb2xsYXBzZS5naWYeDUFsdGVybmF0ZVRleHQFCE1pbmltaXplHgdUb29sVGlwBQhNaW5pbWl6ZRYKHgd1c2VyY3RyBQlVc2FiaWxpdHkeB3VzZXJrZXkFFENvbnRyb2xQYW5lbFZpc2libGUwHgdvb... ---> System.Web.HttpException: Unable to validate data. at System.Web.Configuration.MachineKeySection.GetDecodedData(Byte[] buf, Byte[] modifier, Int32 start, Int32 length, Int32& dataLength) at System.Web.UI.ObjectStateFormatter.Deserialize(String inputString) --- End of inner exception stack trace --- --- End of inner exception stack trace --- at System.Web.UI.ViewStateException.ThrowError(Exception inner, String persistedState, String errorPageMessage, Boolean macValidationError) at System.Web.UI.ViewStateException.ThrowMacValidationError(Exception inner, String persistedState) at System.Web.UI.ObjectStateFormatter.Deserialize(String inputString) at System.Web.UI.ObjectStateFormatter.System.Web.UI.IStateFormatter.Deserialize(String serializedState) at System.Web.UI.Util.DeserializeWithAssert(IStateFormatter formatter, String serializedState) 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) --- End of inner exception stack trace ---
Source: