Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8932443
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T09:19:13+00:00 2026-06-15T09:19:13+00:00

I have come across implementing Anti forgery token for a POST method when its

  • 0

I have come across implementing Anti forgery token for a POST method when its an ajax call,the couple of things I do here are

[1]Include[ValidateAntiForgeryToken] attribute for my POST controller method.

[2]Change $.ajax call to $.ajaxAntiForgery in my js.

Similarly I have a telerik upload control where I trigger the controller method from cshtml(instead of an ajax call)- cshtml code snippet below

@{ var upload = @Html.Telerik().Upload()
                .Name("attachments")
                .Multiple(true)
                .Async(async => async.Save("MyMethodName", "MyConrollerName")

In this case, how do I implement antiforgery? What changes I need to do in cshtml, controller?

Thanks,
Adarsh

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T09:19:13+00:00Added an answer on June 15, 2026 at 9:19 am

    Hello if you use the Kendo Upload wrapper for MVC the antiforgery will be send automatically to the server.

    Since you are using the old extensions you might need to use the OnUpload event to manually find that value and send it to the server.

    e.g.

    function onMyUpload(e){
        e.data = { "__RequestVerificationToken": $('input[name=__RequestVerificationToken]').val() };
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have come across a couple of examples of MOVF being used without the
I have come across an annoying problem. I have made a system and now
I have come across scripts that use: isset($_POST['submit']) as well as code that uses:
I have come across the following basic Tree conflict: Local add, incoming add upon
I have come across many articles which warn against using links to provide logout
I have come across loop-unrolling but what other types of compiler optimization are there
i have come across a mysql database which has dates entered in a varchar
I have come across a strange problem which I would like to get your
We have come across a scenario where we need to track the setting and
I have come across a situation (which I think is weird but is possibly

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.