Visual Studio 2008 .NET 3.5
我正在使用内置的Web服务器进行测试,一切正常。我的TinyMCE代码如下:
<!-- TinyMCE -->
<script type="text/javascript" src="/tiny_mce/tiny_mce.js"></script>
<script type="text/javascript">
tinyMCE.init({
// General options
mode: "textareas",
theme: "advanced",
plugins: "paste",
relative_urls: false,
remove_script_host: false,
// Theme options
theme_advanced_buttons1: "bold,italic,link,unlink,image",
theme_advanced_buttons2: "",
theme_advanced_buttons3: "",
theme_advanced_toolbar_location: "top",
theme_advanced_toolbar_align: "left",
theme_advanced_statusbar_location: "bottom",
theme_advanced_resizing: false,
// Example word content CSS (should be your site CSS) this one removes paragraph margins
content_css: "includes/tinyMCEword.css",
// Drop lists for link/image/media/template dialogs
external_image_list_url: "lists/image_list.js"
});
</script>
<!-- /TinyMCE -->
现在,我遇到的问题是在我拥有此代码的任何页面上,我会间歇性地获取ViewState错误,即:
活动代码:4009 事件消息:Viewstate验证失败。原因:Viewstate无效。
我注意到发生这种情况时,在我的页面顶部,看起来我正在输出ViewState数据(加密)。仅限在使用TinyMCE的页面上。我不知道它为什么会发生。一切都在本地运行得很好,但是当部署到Win2K3服务器(IIS6)时,我遇到了这个问题。
我真的迷失了。有什么想法吗?
谢谢, -Steve
答案 0 :(得分:1)
看起来你的头号标签中没有你的初始化调用,但是我的同事遇到了一个类似的问题,这个问题是由于调用头部的初始化而导致的。将呼叫移动到自己的标签后一切正常。
希望这至少可以帮到某人!
答案 1 :(得分:0)
我的网站遇到了完全相同的问题。部分视图状态数据显示在页面顶部。在当地工作正常。甚至我的javascript代码与你的代码非常相似。
仅在webkit浏览器上发生(safari / chrome)。
似乎tinyMCE在viewstate中随机放置一个.js文件(tiny_mce / themes / advanced / langs / en.js),从而破坏它。
我尝试了不同版本的tinyMCE,更改了javascript代码。到目前为止没有任何工作。
有人有什么想法吗?