Solved

ValidateRequest="false" And AJAX 4 Controls

Posted on 2011-02-14
2
849 Views
Last Modified: 2012-05-11
Greetings;

I'm receiving an error in the end-postback routine of an AJAX 4 control. The text field in question is allowed to accept HTML tags and the page is coded with ValidateRequest="false".

Is there a way to allow HTML tags to pass validation when text is entered into an AJAX 4 control instead of receiving a code 500 error?


Much thanks ... David
0
Comment
Question by:David Bach
2 Comments
 
LVL 14

Accepted Solution

by:
Dhanasekaran Sengodan earned 500 total points
ID: 34896568
In ASP.NET 4, by default, request validation is enabled for all requests, because it is enabled before the BeginRequest phase of an HTTP request. As a result, request validation applies to requests for all ASP.NET resources, not just .aspx page requests. This includes requests such as Web service calls and custom HTTP handlers. Request validation is also active when custom HTTP modules are reading the contents of an HTTP request.

Solution for ValidateRequest="false" Issue in .Net 4.0

To revert to the behavior of the ASP.NET 2.0 request validation feature, add the following setting in the Web.config file:

<system.web>
<httpRuntime requestValidationMode="2.0" />
</system.web>

Open in new window

0
 

Author Closing Comment

by:David Bach
ID: 34900419
Greetings dhansmani;

Your answer was right on! I appreciate the fast response and excellent description of your answer.


Much thanks ... David
0

Featured Post

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Suggested Solutions

jQuery is a JavaScript library that greatly simplifies JavaScript programming. AJAX is an acronym formed from "Asynchronous JavaScript and XML."  AJAX refers to any communication between client and server, when the human client does not observe a…
Introduction HyperText Transfer Protocol (http://www.ietf.org/rfc/rfc2616.txt) or "HTTP" is the underpinning of internet communication.  As a teacher of web development I have heard many questions, mostly from my younger students who have come to t…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now