PageAdmin网站内容管理系统(CMS)交流论坛

注册

 

QQ登录

只需一步,快速开始

发新话题 回复该主题

后台添加内容时候经常出现Server Error in '/' Application. [复制链接]

1#
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:

The source code that generated this unhandled exception can only be shown when compiled in debug mode. To enable this, please follow one of the below steps, then request the URL:

1. Add a "Debug=true" directive at the top of the file that generated the error. Example:

  <%@ Page Language="C#" Debug="true" %>

or:

2) Add the following section to the configuration file of your application:

<configuration>
   <system.web>
       <compilation debug="true"/>
   </system.web>
</configuration>

Note that this second technique will cause all files within a given application to be compiled in debug mode. The first technique will cause only that particular file to be compiled in debug mode.

Important: Running applications in debug mode does incur a memory/performance overhead. You should make sure that an application has debugging disabled before deploying into production scenario.

Stack Trace:

[HttpException (0x80004005): Unable to validate data.]   System.Web.Configuration.MachineKeySection.GetDecodedData(Byte[] buf, Byte[] modifier, Int32 start, Int32 length, Int32& dataLength) +289   System.Web.UI.ObjectStateFormatter.Deserialize(String inputString) +140[ViewStateException: Invalid viewstate.         Client IP: 116.224.250.171        Port: 9662        User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1)        ViewState: /wEPDwUJNjAyMzE1ODQ5DxYCHgZjb25zdHIFYlByb3ZpZGVyPU1pY3Jvc29mdC5KZXQuT0xFREIuNC4wO0RhdGEgU291cmNlPUQ6XHZob3N0c1xza3N3aXRjaC5jb21caHR0cGRvY3NcZGF0YWJhc2VcZGF0YTIwMDkubWRiZBgBBR5fX0NvbnRyb2xzUmVxdWlyZVBvc3RCYWNrS2V5X18WBQUITGF5b3V0XzEFCExheW91dF8yBQhMYXlvdXRfMgUITGF5b3V0XzMFCExheW91dF8zfBKh6OAidR+3EFqf/DJIpFHDDVg=        Referer: http://www.skswitch.com/master/l ... duct.aspx?id=22&;lanmu1=%u9996%u9875&lanmu1id=1&template=%u81ea%u5b9a%u4e49%u6a21%u5757        Path: /master/lanmu_template_introduct.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) +106   System.Web.UI.ViewStateException.ThrowMacValidationError(Exception inner, String persistedState) +14   System.Web.UI.ObjectStateFormatter.Deserialize(String inputString) +242   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() +207   System.Web.UI.Page.LoadPageStateFromPersistenceMedium() +105   System.Web.UI.Page.LoadAllState() +43   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +6785   System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +242   System.Web.UI.Page.ProcessRequest() +80   System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context) +21   System.Web.UI.Page.ProcessRequest(HttpContext context) +49   ASP.master_lanmu_template_introduct_aspx.ProcessRequest(HttpContext context) +4   System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +181   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +75



Version Information: Microsoft .NET Framework Version:2.0.50727.3082; ASP.NET Version:2.0.50727.3082
因为已经有空间了,所以没有本地安装测试,直接上传到网站根目录测试。install完成后主页能正常打开,各个模块也很正常,但是后台就麻烦了。
空间是美国的空间,不管后台添加或修改什么内容,经常会出现这个问题,刷新一下页面恢复正常,再次添加后也有可能会出现出错信息,当然也可能正常添加进去。
有个指标叫添加成功率为20%差不多吧 ,想想应该不是空间的问题,如果是空间授权的问题,那么要么就都添加不上任何信息了,不可能有时候能成功这种状态。
另外后台切换语种的时候总是要刷新一下 然后哦再切换。还有一个奇怪的问题,后台操作的时候英文状态的添加成功率没有中文状态的添加成功率高。狂晕
分享 转发
TOP
2#

Server Error in '/' Application就是服务器不稳定
TOP
3#

1、如果是程序有问题,就不会出现有时能成功添加,

2、“另外后台切换语种的时候总是要刷新一下 然后哦再切换。”
这个没什么大影响吧,因为没有用AJAX技术实现这一功能,所以是要刷新一下的

3、“后台操作的时候英文状态的添加成功率没有中文状态的添加成功率高。”
添加文件的程序成功就100%成功,失败就100%失败,没有您所说的成功率的,可能真的是服务器不稳定引起
TOP
4#

有可能吧 服务器太远 我这里网速太慢可能也有关系,后来我改用国内的空间,就出现过一次这样的情况。
TOP
发新话题 回复该主题