The problem was first found when one of our testers opened the last closed tab from Chrome/Firefox and saw a black empty page. Then I went to DNN's event viewer and got the exception information below.
I don't want to disable MAC validation as it introduces security vulnerabilities. The web site is built on top of DotNetNuke and using a pair of pre-generated validationKey/decryptionKey, running on a single server instead of a Web Farm or cluster. Could
someone advise another way to fix this issue?
Thanks a lot!
AssemblyVersion: 6.1.4
PortalID: 0
PortalName: Xxxxx Xxxxx
UserID: -1
UserName:
ActiveTabID: 2010
ActiveTabName: XxxxxxXxxxxx
RawURL: /xxxxxxx.aspx?bookId=38&chapterId=928&chapterItemType=unit&unitId=4073
AbsoluteURL: /Default.aspx
AbsoluteURLReferrer: http://www.xxxxxx.com.au/xxxxxx.aspx?bookId=38&chapterId=928&chapterItemType=unit&unitId=4073
UserAgent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:16.0) Gecko/20100101 Firefox/16.0
DefaultDataProvider: DotNetNuke.Data.SqlDataProvider, DotNetNuke.SqlDataProvider
ExceptionGUID: d51e89d5-9dd4-4af9-96af-114ded31339f
InnerException: 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.
FileName:
FileLineNumber: 0
FileColumnNumber: 0
Method:
StackTrace:
Message: DotNetNuke.Services.Exceptions.PageLoadException: 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. ---> System.Web.HttpException: 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. ---> System.Web.UI.ViewStateException: Invalid viewstate. Client IP: 203.19.96.5 Port: 26668 Referer: http://www.pearsonplaces.com.au/pearsonreader.aspx?bookId=38&chapterId=928&chapterItemType=unit&unitId=4073 Path: /Default.aspx
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:16.0) Gecko/20100101 Firefox/16.0 ViewState: /wEPDwUKMTkwNjA1NjgwNQ9kFgZmDxYCHgRUZXh0BXk8IURPQ1RZUEUgaHRtbCBQVUJMSUMgIi0vL1czQy8vRFREIFhIVE1MIDEuMCBUcmFuc2l0aW9uYWwvL0VOIiAiaHR0cDovL3d3dy53My5vcmcvVFIveGh0bWwxL0RURC94aHRtbDEtdHJhbnNpdGlvbmFsLmR0ZCI+ZAIBD2QWDgIFDxYCHgdWaXNpYmxlaGQCBg8WAh4HY29udGVudAVmUGVhcnNvbiBQbGFjZXMgaXMgdGhlIGdhdGV3YXkgdG8gZGlnaXRhbCBsZWFybmluZyBtYXRlcmlhbCBmb3IgdGVhY2hlcnMgYW5kIHN0dWRlbnRzIGFjcm9zcyBBdXN0cmFsaWEuZAIHDxYEHwJkHwFoZAIIDxYCHwIFI0NvcHlyaWdodCAyMDEyIGJ5IFBlYXJzb24gQXVzdHJhbGlhZAIJDxYEHwJkHwFoZAIKDxYCHwIFDlBlYXJzb24gUGxhY2VzZAINDxYCHwIFDUlOREVYLCBGT0xMT1dkAgIPZBYCAgEPZBYEZg9kFgJmDxYCHwFoFgJmD2QWAmYPZBYGAgMPEGRkFgBkAg8PZBYCZg8PFgYeCEltYWdlVXJsBRQvaW1hZ2VzL2NvbGxhcHNlLmdpZh4NQWx0ZXJuYXRlVGV4dAUITUlOSU1JU0UeB1Rvb2xUaXAFCE1JTklNSVNFFgoeB3VzZXJjdHIF...
--- End of inner exception stack trace --- at System.Web.UI.ViewStateException.ThrowMacValidationError(Exception inner, String persistedState) at System.Web.UI.ObjectStateFormatter.Deserialize(String inputString) 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 ---
iceney
0 Points
1 Post
Validation of viewstate MAC failed
Dec 10, 2012 11:32 PM|LINK
Hi,
The problem was first found when one of our testers opened the last closed tab from Chrome/Firefox and saw a black empty page. Then I went to DNN's event viewer and got the exception information below.
I don't want to disable MAC validation as it introduces security vulnerabilities. The web site is built on top of DotNetNuke and using a pair of pre-generated validationKey/decryptionKey, running on a single server instead of a Web Farm or cluster. Could someone advise another way to fix this issue?
Thanks a lot!
AssemblyVersion: 6.1.4
PortalID: 0
PortalName: Xxxxx Xxxxx
UserID: -1
UserName:
ActiveTabID: 2010
ActiveTabName: XxxxxxXxxxxx
RawURL: /xxxxxxx.aspx?bookId=38&chapterId=928&chapterItemType=unit&unitId=4073
AbsoluteURL: /Default.aspx
AbsoluteURLReferrer: http://www.xxxxxx.com.au/xxxxxx.aspx?bookId=38&chapterId=928&chapterItemType=unit&unitId=4073
UserAgent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:16.0) Gecko/20100101 Firefox/16.0
DefaultDataProvider: DotNetNuke.Data.SqlDataProvider, DotNetNuke.SqlDataProvider
ExceptionGUID: d51e89d5-9dd4-4af9-96af-114ded31339f
InnerException: 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.
FileName:
FileLineNumber: 0
FileColumnNumber: 0
Method:
StackTrace:
Message: DotNetNuke.Services.Exceptions.PageLoadException: 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. ---> System.Web.HttpException: 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. ---> System.Web.UI.ViewStateException: Invalid viewstate. Client IP: 203.19.96.5 Port: 26668 Referer: http://www.pearsonplaces.com.au/pearsonreader.aspx?bookId=38&chapterId=928&chapterItemType=unit&unitId=4073 Path: /Default.aspx User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:16.0) Gecko/20100101 Firefox/16.0 ViewState: /wEPDwUKMTkwNjA1NjgwNQ9kFgZmDxYCHgRUZXh0BXk8IURPQ1RZUEUgaHRtbCBQVUJMSUMgIi0vL1czQy8vRFREIFhIVE1MIDEuMCBUcmFuc2l0aW9uYWwvL0VOIiAiaHR0cDovL3d3dy53My5vcmcvVFIveGh0bWwxL0RURC94aHRtbDEtdHJhbnNpdGlvbmFsLmR0ZCI+ZAIBD2QWDgIFDxYCHgdWaXNpYmxlaGQCBg8WAh4HY29udGVudAVmUGVhcnNvbiBQbGFjZXMgaXMgdGhlIGdhdGV3YXkgdG8gZGlnaXRhbCBsZWFybmluZyBtYXRlcmlhbCBmb3IgdGVhY2hlcnMgYW5kIHN0dWRlbnRzIGFjcm9zcyBBdXN0cmFsaWEuZAIHDxYEHwJkHwFoZAIIDxYCHwIFI0NvcHlyaWdodCAyMDEyIGJ5IFBlYXJzb24gQXVzdHJhbGlhZAIJDxYEHwJkHwFoZAIKDxYCHwIFDlBlYXJzb24gUGxhY2VzZAINDxYCHwIFDUlOREVYLCBGT0xMT1dkAgIPZBYCAgEPZBYEZg9kFgJmDxYCHwFoFgJmD2QWAmYPZBYGAgMPEGRkFgBkAg8PZBYCZg8PFgYeCEltYWdlVXJsBRQvaW1hZ2VzL2NvbGxhcHNlLmdpZh4NQWx0ZXJuYXRlVGV4dAUITUlOSU1JU0UeB1Rvb2xUaXAFCE1JTklNSVNFFgoeB3VzZXJjdHIF... --- End of inner exception stack trace --- at System.Web.UI.ViewStateException.ThrowMacValidationError(Exception inner, String persistedState) at System.Web.UI.ObjectStateFormatter.Deserialize(String inputString) 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 ---
BrockAllen
All-Star
28072 Points
4996 Posts
MVP
Re: Validation of viewstate MAC failed
Dec 11, 2012 07:38 PM|LINK
Well, if you think about it -- opening the last open tab contains stale data (the old viewstate mac). Obviously this isn't going to work.
DevelopMentor | http://www.develop.com
thinktecture | http://www.thinktecture.com/