potentially dangerous Request.Form value was detected from the client...with RTE and master pages

Hello,

I have this problem using RTE in ASp.NET WEB FORMS: every time I save the content of RTE or other reasons I refresh the page, I get  "potentially dangerous Request.Form value was detected from the client.,,,"

I have already tried these implementations

added to web.config   

<system.web>
    <httpRuntime requestValidationMode="2.0" />
    <compilation debug="true" strict="false" explicit="true" targetFramework="4.7">
      <assemblies>
        <add assembly="System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />
        <add assembly="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
      </assemblies>
    </compilation>
    <pages validateRequest="false" controlRenderingCompatibilityVersion="4.0" enableEventValidation="false">
                                        ........

added on both master page and page "<%@ Page Title="" Language="vb" .....ValidateRequest="false"

but i don't get any results, always the same problem.


This is my XAML code:

.....
        <tr>
            <td>&nbsp;</td>
            <td colspan="2">
              
                <ej:RTE ID="RTE1" Name="rteManualMail" runat="server">
                </ej:RTE>
               
             </td>
        </tr>
        <tr>
            <td>&nbsp;</td>
            <td colspan="2" style="text-align: center">
               
                <ej:Button ID="btnSendManualEmail" runat="server" ContentType="TextOnly" Size="Medium" Text="INVIA MAIL AI CONCORRENTI" Width="200">
                </ej:Button>
               
             </td>
        </tr>
    </table>

Thanks a lot for your attention

3 Replies 1 reply marked as answer

MK Muthukrishnan Kandasamy Syncfusion Team October 8, 2020 06:10 AM UTC

 
Hi Massimo, 
 
Thanks for contacting Syncfusion support. 
 
We have validated your reported problem in EJ RTE control. We can  resolve your reported problem (A potentially dangerous Request.Form value was detected from the client) in ASP.NET Application. To resolve your problem, we need add the validateRequest as false in pages tag and add requestValidationMode as 2.0 in Web.config file. Please refer to the below code block. 
 
[Web.config] 
 
  <system.web> 
    <compilation debug="true" strict="false" explicit="true" targetFramework="4.6"> 
      <assemblies> 
      </assemblies> 
    </compilation> 
    <httpRuntime targetFramework="4.6" requestValidationMode="2.0" /> 
    <pages validateRequest="false"> 
      <namespaces> 
 
Please refer to the below KB documentation for more details. 
 
 
Please refer to the below forums the similar problem discussed. 
 
 
 
 
We have prepared sample for your convenience, which can be downloaded from the below link. 
 
 
Please let us know, if you need any further assistance. 
 
Regards, 
Muthukrishnan K 



BA Bassan October 8, 2020 06:42 AM UTC

Hi,

thanks for your prompt answer.

Anyway, I already HAVE both settings in my web.config as you can see in my post, here again:




MK Muthukrishnan Kandasamy Syncfusion Team October 9, 2020 10:55 AM UTC

 
Hi Massimo, 
 
Thanks for the update. 
 
After adding the previously mentioned code in the Web.config file then your reported problem was resolved in our validation application. Please ensure it, once after removing the bin and obj folders and rebuild the project. 
 
Please refer to the below forums the similar problem discussed. 
 
 
 
 
If the issue still persists in your end, please share the issue replicating sample or replicate your reported issue in the shared sample. 
 
Regards, 
Muthukrishnan K 


Marked as answer
Loader.
Up arrow icon