FineUI 官方论坛

 找回密码
 立即注册

QQ登录

只需一步,快速开始

本论坛已关闭(禁止注册、发帖和回复)
请移步 三石和他的朋友们

FineUI首页 WebForms - MVC & Core - JavaScript 常见问题 - QQ群 - 十周年征文活动

FineUI(开源版) 下载源代码 - 下载空项目 - 获取ExtJS - 文档 在线示例 - 版本更新 - 捐赠作者 - 教程

升级到 ASP.NET Core 3.1,快、快、快! 全新ASP.NET Core,比WebForms还简单! 欢迎加入【三石和他的朋友们】(基础版下载)

搜索
查看: 4974|回复: 5
打印 上一主题 下一主题

最新源码示例中UEditor控件在win8+ vs2012+.net4.0中获取和设置值

[复制链接]
跳转到指定楼层
楼主
发表于 2012-12-22 08:52:11 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
“/”应用程序中的服务器错误。
从客户端(UEditor1="<p>This is some <str...")中检测到有潜在危险的 Request.Form 值。
说明: ASP.NET 在请求中检测到包含潜在危险的数据,因为它可能包括 HTML 标记或脚本。该数据可能表示存在危及应用程序安全的尝试,如跨站点脚本攻击。如果此类型的输入适用于您的应用程序,则可包括明确允许的网页中的代码。有关详细信息,请参阅 http://go.microsoft.com/fwlink/?LinkID=212874

异常详细信息: System.Web.HttpRequestValidationException: 从客户端(UEditor1="<p>This is some <str...")中检测到有潜在危险的 Request.Form 值。

源错误:

[没有相关的源行]

源文件: c:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\65683975\488a9847\App_Web_mobm0irg.6.cs    行: 0

堆栈跟踪:

[HttpRequestValidationException (0x80004005): 从客户端(UEditor1="<p>This is some <str...")中检测到有潜在危险的 Request.Form 值。]   System.Web.HttpRequest.ValidateString(String value, String collectionKey, RequestValidationSource requestCollection) +9665149   System.Web.HttpRequest.ValidateHttpValueCollection(HttpValueCollection collection, RequestValidationSource requestCollection) +184   System.Web.HttpRequest.get_Form() +55   System.Web.HttpRequest.get_HasForm() +9666735   System.Web.UI.Page.GetCollectionBasedOnMethod(Boolean dontReturnNull) +95   System.Web.UI.Page.DeterminePostBackMode() +69   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +6704   System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +245   System.Web.UI.Page.ProcessRequest() +72   System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context) +21   System.Web.UI.Page.ProcessRequest(HttpContext context) +58   ASP.aspnet_ueditor_aspx.ProcessRequest(HttpContext context) in c:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\65683975\488a9847\App_Web_mobm0irg.6.cs:0   System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +341   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +69


版本信息: Microsoft .NET Framework 版本:4.0.30319; ASP.NET 版本:4.0.30319.18010

沙发
发表于 2012-12-22 12:16:22 | 只看该作者
  1. <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ueditor.aspx.cs" ValidateRequest="false"
  2.     Inherits="FineUI.Examples.aspnet.ueditor" %>
复制代码
应该在页面声明中添加 ValidateRequest 属性
板凳
 楼主| 发表于 2012-12-23 09:15:45 | 只看该作者
sanshi 发表于 2012-12-22 12:16
应该在页面声明中添加 ValidateRequest 属性

默认的示例里面已经有这个属性并且已经设置为false了。但是还是提示上面的错误。
地板
发表于 2012-12-24 02:52:03 | 只看该作者
http://fineui.com/demo 没有报错....
5#
发表于 2012-12-28 07:31:46 | 只看该作者
如果添加ValidateRequest不能解决问题,可以将web.config中的<httpRuntime requestValidationMode="2.0"/>项改为2.0即可。
.net 4.0遇到过类似问题。
6#
发表于 2014-5-4 14:34:08 | 只看该作者
两个我都修改了,但还是提示这个错误,
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

小黑屋|FineUI 官方论坛 ( 皖ICP备2021006167号-1 )

GMT+8, 2024-9-28 15:22 , Processed in 0.045680 second(s), 17 queries , Gzip On.

Powered by Discuz! X3.4

© 2001-2017 Comsenz Inc.

快速回复 返回顶部 返回列表