request-validation

Request Validation - ASP.NET MVC 2

若如初见. 提交于 2019-11-27 02:08:19
问题 Has request validation changed for ASP.NET MVC 2, more precisely, not validating? I did the following: Web.configs (in App directory and Views directory) <pages validateRequest="false" Controller/Action Attribute [ValidateInput(false)] In @Page View Directive ValidateRequest="false" The page still gets validated an exception is thrown when HTML content is posted. UPDATE Created a new ASP.NET MVC 2 Application and I modified the Home Controller's Index to this [ValidateInput(false)] public