I get an error when submitting an .ASPX page in Safari beta, MAC and PC
document.getElementbyId(‘FolderBrowser’).submit();
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.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.
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.Configuration.MachineKeySection.GetDeco dedData(Byte[] buf, Byte[] modifier, Int32 start, Int32 length, Int32& dataLength) +2546748
System.Web.UI.ObjectStateFormatter.Deserialize(Str ing inputString) +214
[ViewStateException: 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: /wEPDwUIOTA5OTg1MThkZB0TdeU3bnOlPBB5jBLNh4FsKeD+
Referer: http://192.0.0.13/filewaytest/folderbrowser.aspx?
Path: /filewaytest/folderbrowser.aspx]
[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.ViewStateException.ThrowError(Except ion inner, String persistedState, String errorPageMessage, Boolean macValidationError) +116
System.Web.UI.ObjectStateFormatter.Deserialize(Str ing inputString) +251
System.Web.UI.ObjectStateFormatter.System.Web.UI.I StateFormatter.Deserialize(String serializedState) +4
System.Web.UI.Util.DeserializeWithAssert(IStateFor matter formatter, String serializedState) +37
System.Web.UI.HiddenFieldPageStatePersister.Load() +220
System.Web.UI.Page.LoadPageStateFromPersistenceMed ium() +83
System.Web.UI.Page.LoadAllState() +35
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +6953
System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +154
System.Web.UI.Page.ProcessRequest() +86
System.Web.Util.AspCompatApplicationStep.System.We b.HttpApplication.IExecutionStep.Execute() +19
System.Web.HttpApplication.ExecuteStep(IExecutionS tep step, Boolean& completedSynchronously) +64
This application is not hosted by a web farm or cluster. I can get rid of this error by setting the enableViewStateMac=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.getElementbyId(‘FolderBrowser’)..__VIEWST ATE.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]