Skip to main content

Notifications

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

  • Verified answer
    Arpit Shrivastava Profile Picture
    7,518 User Group Leader on at
    RE: Not able to submit Entity Form and getting Server Error in '/' Application.

    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

  • Suggested answer
    Aric Levin - MVP Profile Picture
    30,188 Moderator on at
    RE: Not able to submit Entity Form and getting Server Error in '/' Application.

    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...

  • Suggested answer
    gdas Profile Picture
    50,091 Moderator on at
    RE: Not able to submit Entity Form and getting Server Error in '/' Application.

    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.

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

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Adis Hodzic – Community Spotlight

We are honored to recognize Adis Hodzic as our May 2025 Community…

Leaderboard > Microsoft Dynamics CRM (Archived)

#1
Mohamed Amine Mahmoudi Profile Picture

Mohamed Amine Mahmoudi 83 Super User 2025 Season 1

#2
Community Member Profile Picture

Community Member 52

#3
Victor Onyebuchi Profile Picture

Victor Onyebuchi 6

Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans