无法加载视图状态.正在加载视图状态的控件树 [英] Failed to load viewstate. The control tree into which viewstate is being loaded

查看:23
本文介绍了无法加载视图状态.正在加载视图状态的控件树的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在 UserControl 内托管的 ASP.NET 表单上执行 HTTP POST 后收到以下错误消息:

I am receiving the following error message after an HTTP POST on an ASP.NET form hosted inside a UserControl:

未能加载视图状态.正在加载视图状态的控制树必须与在前一个请求期间用于保存视图状态的控制树相匹配.例如,动态添加控件时,回发时添加的控件必须与初始请求时添加的控件的类型和位置相匹配.

Failed to load viewstate. The control tree into which viewstate is being loaded must match the control tree that was used to save viewstate during the previous request. For example, when adding controls dynamically, the controls added during a post-back must match the type and position of the controls added during the initial request.

以下是附加信息:

  • 我正在运行 .NET 4.5 RC
  • 这是一个基于 Umbraco 4.7 的网站
  • 在我的本地开发机器上,该表单完美
  • 此错误仅发生在具有 .NET 4.5(仅)、MSSQL 2012 Express、IIS 7.5、Windows 7(我知道,它还不是真正的服务器,也许有一天...)的临时服务器上>
  • 服务器不属于网络农场(或花园,但应该无关紧要)
  • 用户控件确实动态呈现控件
  • I'm running .NET 4.5 RC
  • It's an Umbraco 4.7-based website
  • On my local dev machine the form works perfectly
  • This error only occurs on the staging server which has .NET 4.5 (only), MSSQL 2012 Express, IIS 7.5, Windows 7 (I know, it's not a real server yet, one day maybe...)
  • The server is not part of a web farm (or garden, tho that should be irrevelant)
  • The user control does render controls dynamically

我已经应用了所有最新的服务包.我现在已经没有想法了!我什至重新启动了它,并在服务器上进行了包括歌曲和特殊舞蹈在内的丰富的表演,但无济于事.

I have applied all the latest service packs. I have run out of ideas now! I have even restarted it and also performed a richual over the server involving a song and a special dance to no avail.

推荐答案

好的,所以答案就是字面意思:使用与上一个相同的软件设置一个新服务器,然后再试一次",现在它可以工作了.

OK, so the answer is literally: "Set up a new server with all the same software as the last one and try again" and it works now.

这篇关于无法加载视图状态.正在加载视图状态的控件树的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆