一个页面post提交到另一个页面,出现下面这个问题 ,添加enableEventValidation="false"   enableViewStateMac="false" 也没用 在vs里运行是没问题的 但到iis里就出问题了“/”应用程序中的服务器错误。 
-------------------------------------------------------------------------------- 验证视图状态   MAC   失败。如果此应用程序由网络场或群集承载,请确保   <machineKey>   配置指定了相同的   validationKey   和验证算法。不能在群集中使用   AutoGenerate。   
说明:   执行当前   Web   请求期间,出现未处理的异常。请检查堆栈跟踪信息,以了解有关该错误以及代码中导致错误的出处的详细信息。   异常详细信息:   System.Web.HttpException:   验证视图状态   MAC   失败。如果此应用程序由网络场或群集承载,请确保   <machineKey>   配置指定了相同的   validationKey   和验证算法。不能在群集中使用   AutoGenerate。 源错误:   
[没有相关的源行] 
  源文件:   c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary   ASP.NET   Files\root\4ec503ad\23f55045\App_Web_nbh2icbc.6.cs         
行:   0   堆栈跟踪:   
[HttpException   (0x80004005):   无法验证数据。] 
      System.Web.Configuration.MachineKeySection.GetDecodedData(Byte[]   buf,   Byte[]   modifier,   Int32   start,   Int32   length,   Int32&   dataLength)   +2546764 
      System.Web.UI.ObjectStateFormatter.Deserialize(String   inputString)   +214 [ViewStateException:   无效的视图状态。 
Client   IP:   127.0.0.1 
Port:   4331 
User-Agent:   Mozilla/4.0   (compatible;   MSIE   6.0;   Windows   NT   5.1;   SV1;   .NET   CLR   2.0.50727) 
ViewState:   /wEPDwUJNzgzNDMwNTMzZGTveAspC/g1fip0CcozRxCNi3q2EQ== 
Referer:   http://localhost/choose.aspx 
Path:   /previewSkin.aspx] [HttpException   (0x80004005):   验证视图状态   MAC   失败。如果此应用程序由网络场或群集承载,请确保   <machineKey>   配置指定了相同的   validationKey   和验证算法。不能在群集中使用   AutoGenerate。] 
      System.Web.UI.ViewStateException.ThrowError(Exception   inner,   String   persistedState,   String   errorPageMessage,   Boolean   macValidationError)   +116 
      System.Web.UI.ObjectStateFormatter.Deserialize(String   inputString)   +251 
      System.Web.UI.ObjectStateFormatter.System.Web.UI.IStateFormatter.Deserialize(String   serializedState)   +4 
      System.Web.UI.Util.DeserializeWithAssert(IStateFormatter   formatter,   String   serializedState)   +37 
      System.Web.UI.HiddenFieldPageStatePersister.Load()   +220 
      System.Web.UI.Page.LoadPageStateFromPersistenceMedium()   +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.UI.Page.ProcessRequestWithNoAssert(HttpContext   context)   +18 
      System.Web.UI.Page.ProcessRequest(HttpContext   context)   +49 
      ASP.previewskin_aspx.ProcessRequest(HttpContext   context)   in   c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary   ASP.NET   Files\root\4ec503ad\23f55045\App_Web_nbh2icbc.6.cs:0 
      System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()   +154 
      System.Web.HttpApplication.ExecuteStep(IExecutionStep   step,   Boolean&   completedSynchronously)   +64