Click here to Skip to main content
15,346,189 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I had integrated CKEditor in the project but When I tried to store it in the database it gives an error,
A potentially dangerous Request.Form value was detected from the client (Post_Content="<p>Test</p>
In order to overcome the problem, I added the
validationrequest = false.
then it works.Instead of doing this, due to security concerns, I have encrypted the value and stored it in the database but the moment I removed
validationrequest = false.
it gives the same error despite storing them as encrypted files. So how to store Ckeditor values in the database without removing validations input?

What I have tried:

byte[] data = System.Text.Encoding.UTF8.GetBytes(post.Post_Content);
               newPost.Post_Content = Convert.ToBase64String(data);
Updated 21-Apr-22 15:26pm

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900