I get an error when submitting an .ASPX page in Safari beta, MAC and PC
document.getEle mentbyId(‘Folde rBrowser’).subm it();
After the server side code has executed without problems I get the following error.
Server Error in '/FileWayTest' Application.
--------------------------------------------------------------------------------
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.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Web.Http 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.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[HttpException (0x80004005): Unable to validate data.]
System.Web.Conf iguration.Machi neKeySection.Ge tDecodedData(By te[] buf, Byte[] modifier, Int32 start, Int32 length, Int32& dataLength) +2546748
System.Web.UI.O bjectStateForma tter.Deserializ e(String inputString) +214
[ViewStateExcept ion: Invalid viewstate.
Client IP: 192.0.0.80
Port: 4057
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en) AppleWebKit/522.15.5 (KHTML, like Gecko) Version/3.0.3 Safari/522.15.5
ViewState: /wEPDwUIOTA5OTg1 MThkZB0TdeU3bnO lPBB5jBLNh4FsKe D+
Referer: http://192.0.0.13/filewaytest/folderbrowser.aspx?
Path: /filewaytest/folderbrowser.a spx]
[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.]
System.Web.UI.V iewStateExcepti on.ThrowError(E xception inner, String persistedState, String errorPageMessag e, Boolean macValidationEr ror) +116
System.Web.UI.O bjectStateForma tter.Deserializ e(String inputString) +251
System.Web.UI.O bjectStateForma tter.System.Web .UI.IStateForma tter.Deserializ e(String serializedState ) +4
System.Web.UI.U til.Deserialize WithAssert(ISta teFormatter formatter, String serializedState ) +37
System.Web.UI.H iddenFieldPageS tatePersister.L oad() +220
System.Web.UI.P age.LoadPageSta teFromPersisten ceMedium() +83
System.Web.UI.P age.LoadAllStat e() +35
System.Web.UI.P age.ProcessRequ estMain(Boolean includeStagesBe foreAsyncPoint, Boolean includeStagesAf terAsyncPoint) +6953
System.Web.UI.P age.ProcessRequ est(Boolean includeStagesBe foreAsyncPoint, Boolean includeStagesAf terAsyncPoint) +154
System.Web.UI.P age.ProcessRequ est() +86
System.Web.Util .AspCompatAppli cationStep.Syst em.Web.HttpAppl ication.IExecut ionStep.Execute () +19
System.Web.Http Application.Exe cuteStep(IExecu tionStep step, Boolean& completedSynchr onously) +64
This application is not hosted by a web farm or cluster. I can get rid of this error by setting the enableViewState Mac=false, however this causes other problems, and besides which I understand this “fix” raises security issues. I can also get rid of this error by executing the following code before the submit.
document.getEle mentbyId(‘Folde rBrowser’)..__V IEWSTATE.name=" name";
This also causes other problems, and has unusual side effects on the page.
Can anyone help me?
Ken Shimizu
Everywhere Networks Corporation
Ottawa, Canada
[removed email address. please contact via PM]