检测到有潜在危险的 Request.Form 值

http://www.cnblogs.com/youring2/p/3559781.html

http://blog.unvs.cn/archives/a-potentially-dangerous-request-form-value.html

http://blog.unvs.cn/archives/vs-debug-question.html

以上是搜索到的连接,我的项目环境是vs2010,mvc4,解决方法是在对应的Action前面加上[ValidateInput(false)]

//
        // POST: /RiceChengguo/Create
        [ValidateInput(false)]
        [HttpPost]
        public ActionResult Create(RiceChengguo rChengguo)
        {
            try
            {
                // TODO: Add insert logic here
                rChengguo.Insert();
                return View("AddSuccess", rChengguo);
            }
            catch
            {
                return View();
            }
        }
原文地址:https://www.cnblogs.com/zkwarrior/p/4843536.html