web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Not able to submit Entity Form and getting Server Error in '/' Application.

(0) ShareShare
ReportReport
Posted on by

Server Error in '/' Application.


A potentially dangerous Request.Form value was detected from the client (ctl00$ctl00$ctl00$ContentContainer$MainContent$MainContent$ContentBottom$ProfileFormView$new_comment="<abc@gmail.com>

 

Please suggest.

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    gdas Profile Picture
    50,091 Moderator on at

    Hello ,

    This is due to the " <"  "> " , which is unable to parse . Try to replace those special characters at the time of on save -

    function escapeHtml(text) {
      return text
          .replace(/&/g, "&amp;")
          .replace(/</g, "&lt;")
          .replace(/>/g, "&gt;")
          .replace(/"/g, "&quot;")
          .replace(/'/g, "&#039;");
    }


    Hope this helps.

  • Suggested answer
    Aric Levin - MVP Profile Picture
    30,190 Moderator on at

    Hi CRM Tech,

    It seems like you have invalid characters causing the potentially dangerous request...

    Remove the greater than and less than signs from your comment field...

    Just to be a little bit clear about the issue, see the following link about request validation.

    docs.microsoft.com/.../request-validation

    Hope this helps...

  • Verified answer
    Arpit Shrivastava Profile Picture
    7,518 User Group Leader on at

    Hi,

    As I mentioned in this https://community.dynamics.com/crm/f/117/t/278528 post. Angle brackets are not supported in Multiline fields on Portal due to its own limitations.

    You can use below code under custom javascript to get rid of this error:

    $(window).load(function(){

    // Remove default onpaste event of textarea
    $("#id").removeAttr("onpaste");

    // OnKeypress Event
    $('#id').keypress(function(event) {
    if (event.keyCode == 60 || event.keyCode == 62) {
    alert("You are not allowed to enter Angle brackets");
    return false;
    }
    });

    // Onpaste Event

    $("#id").bind('paste',function()
    {
    setTimeout(function()

    //get the value of the input text
    var data= $('#id').val() ;
    //replace the <> to '' 
    var dataFull = data.replace(/[<>]/g, '');
    //set the new value of the input text without special characters
    $('#id').val(dataFull);
    });

    });
    });

    If my answer helped to resolve your issue, kindly verify it by clicking 'Yes'. It would be helpful to the other community members seeking to resolve a similar issue.

    Cheers
    Arpit
    https://arpitmscrmhunt.blogspot.in

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans