出现Server Error in '/' Application错误,如何解决,急!
我将生成的网站放上服务器后,没有任何规律的出现如下错误
Server Error in '/' 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:
[No relevant source lines]
Source File: c:\windows\Microsoft.NET\Framework\v2.0.50727\Temporary
ASP.NET Files\root\09094339\a12fcd99\App_Web_x9zbrj54.0.cs Line: 0
Stack Trace:
[HttpException (0x80004005): Unable to validate data.]
System.Web.Configuration.MachineKeySection.GetDecodedData(Byte[] buf, Byte[] modifier,
Int32 start, Int32 length, Int32& dataLength) +2546796
System.Web.UI.ObjectStateFormatter.Deserialize(String inputString) +214
[ViewStateException: Invalid viewstate.
Client IP: xx.xx.xx.xx
Port: 43624
User-Agent:
Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; QQDownload 1.7; MAXTHON 2.0)
ViewState:
/wEPDwUJMzI3NTYwMjkyZBgBBR5fX0NvbnRyb2xzUmVxdWlyZVBvc3RCYW
NrS2V5X18WAQUITG9naW5CdG4TH0tukP/Jhegloy/sJy85SBNOzw==
Referer: http://www.xxxxx.com/dir1/index.aspx
Path: /dir1/index.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(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.webmaster_login_aspx.ProcessRequest(HttpContext context) in
c:\windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\09094339\a12fcd99\App_Web_x9zbrj54.0.cs:0
System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +154
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +64
--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.50727.42; ASP.NET Version:2.0.50727.42
发生的频率不是特高,没有什么规律性。有的时候已登录网站就这样,有的时候是点击某些页面的也会出现。请问这个是什么错误,怎么解决呀?
这个是不是和web.config中的<machineKey>有关系?我没有指定这个元素!!
另外我加入了<authentication mode="Windows"/>!!