Coding⏱️ 2 min read📅 2026-06-03

How to Fix: The required anti-forgery form field "__RequestVerificationToken" is not present Error in user Registration

Membership.create function uses anti-forgery token for security, ensure it's included in form data.

Quick Answer: Add the '__RequestVerificationToken' field to your registration form and pass its value as a hidden input or use the Membership.Create method's options parameter to include it.

The 'The required anti-forgery form field "__RequestVerificationToken" is not present' error in user registration is a common issue that can be resolved by implementing the following steps.

⚠️ Common Causes

  • Using outdated or unsupported versions of ASP.NET Core.

🚀 How to Resolve This Issue

Method 1: Using ASP.NET Core 5 or Later

  1. Step 1: Ensure you are using a version of ASP.NET Core that supports the __RequestVerificationToken field.

Method 2: Using CSRF Token in Web API

  1. Step 1: In your Web API controller, add the [EnableCors] attribute to specify that you want to allow cross-origin requests.

🎯 Final Words

By following these steps, you should be able to resolve the 'The required anti-forgery form field "__RequestVerificationToken" is not present' error and successfully register users.

Did this fix your problem?

If not, try searching for specific error codes.

🔍 Search Error Database

❓ Frequently Asked Questions