We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

HTTPRequestValidationException when closing Toolbar dialog windows

I have a RTE that works correctly in a Dialog window that uses the loadURL and has content set to iframe.  The Dialog shows and the RTE is visible and functioning.  When I click on the Hyperlink toolbar button, it shows the Hyperlink window and allows me to put the various values in it and submit it.  It adds the link to the RTE, but then I get the HTTPRequestValidationException error.  Even if I Cancel out of the Hyperlink window, I still get this error.  The error is listed below:

A potentially dangerous Request.Form value was detected from the client (rteHTML="...e legit...<div><br></div><div>...").

Description: ASP.NET has detected data in the request that is potentially dangerous because it might include HTML markup or script. The data might represent an attempt to compromise the security of your application, such as a cross-site scripting attack. If this type of input is appropriate in your application, you can include code in a web page to explicitly allow it. For more information, see http://go.microsoft.com/fwlink/?LinkID=212874. 

Exception Details: System.Web.HttpRequestValidationException: A potentially dangerous Request.Form value was detected from the client (rteHTML="...e legit...<div><br></div><div>...").

Source Error: 


[No relevant source lines]

Source File: c:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\eapptrack\403e7e25\d34f3460\App_Web_enbydtxn.0.cs    Line: 0 

Stack Trace: 


[HttpRequestValidationException (0x80004005): A potentially dangerous Request.Form value was detected from the client (rteHTML="...e legit...<div><br></div><div>...").]
   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.tools_editor_aspx.ProcessRequest(HttpContext context) in c:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\eapptrack\403e7e25\d34f3460\App_Web_enbydtxn.0.cs:0
   System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +341
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +69

Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.17929



3 Replies

SM Suganya M Syncfusion Team February 25, 2014 06:08 AM UTC

Hi Anthony,

Thanks for using Syncfusion Products.

As per your suggestion we have created a sample with dialog control with its content as RTE control using loadUrl property in ASP.NET.  We are trying to reproduce the issue in our end.  Also, we have analyzed the cases in which such HTTPRequestValidationException error occurs and found a solution in the link [http://stackoverflow.com/questions/81991/a-potentially-dangerous-request-form-value-was-detected-from-the-client], please try the solution in the link; meanwhile we will try to reproduce the issue in our end. And could you please provide us some more information such as whether you have used any form validations in the sample and so on that would be of great help for us to reproduce the issue in our end and provide you the better solution.
Please get back to us if you need further assistance.

Thanks/Regards,
Suganya M


AL Anthony Lofton March 4, 2014 04:24 PM UTC

I found the issue.  I had placed the TextArea for the RTE inside a form tag.  This was causing all of the toolbar buttons to cause the page to postback.  
Your suggestion kept it from getting the error and that then helped me see that it was posting back.  Removing the form tag fixed the issue. 

Thanks for the help!


HP Harikrishnan P Syncfusion Team March 6, 2014 08:34 AM UTC

Hi Anthony,

Thanks for your update. We will wait to hear from you if you need further assistance.

Regards,

HariKrishnan.


Loader.
Live Chat Icon For mobile
Up arrow icon