Activities of "EngincanV"

Hi, with v5.1 Angular 13 is supported and v5.1 ABP Startup Templates use Angular 13.

https://blog.abp.io/abp/ABP.IO-Platform-v5-1-Has-Been-Released

Hi @selinkoykiran, your problem will be resolved with this PR.

Hi @SouravParia, we have a sample project named StoredProcedureDemo, maybe you can check AppUserRepository.cs in this sample project.

using (var command = CreateCommand("<your_stored_procedure_name>", CommandType.StoredProcedure, new SqlParameter[] { /* your parameters: E.g. new SqlParameter("id", id) */ }))
{
    //your logic...
}
Configure<AbpAntiForgeryOptions>(options =>
{
    options.AutoValidateIgnoredHttpMethods.Remove("GET"); //auto validate for GET requests
});

After I've configured the AbpAntiForgeryOptions as above, I could not send a successful GET request to my endpoints unless I provide a RequestVerificationToken header.

But if there is an interceptor and passes a RequestVerificationToken on behalf of me, I can successfully make a GET request as follow. (And we do it on Swagger UI)


So can you try to navigate the URL of one of your GET requests on the browser? I am not sure but "burpsuite" might be intercepting the request and passing the RequestVerificationToken automatically (maybe you can check the header that it passed).

Hi @Anjaneyulu, you're not sending requests via Swagger right?

Then you can create a middleware as below and get the generated cookie and pass it to the RequestVerificationToken header.

P.S. If your GET requests don't change the state (and it shouldn't in most cases), you don't need to add anti-forgery token validation, in my opinion.

public class SetRequestVerificationHeaderMiddleware
{
    private readonly RequestDelegate _next;
    private readonly IAbpAntiForgeryManager _abpAntiForgeryManager;

    public ValidateAntiForgeryTokenMiddleware(RequestDelegate next, IAbpAntiForgeryManager abpAntiForgeryManager)
    {
        _next = next;
        _abpAntiForgeryManager = abpAntiForgeryManager;
    }

    public async Task Invoke(HttpContext context)
    {
        if (HttpMethods.IsGet(context.Request.Method))
        {
           var antiForgeryToken = await _abpAntiForgeryManager.GenerateToken();
           context.Request.Headers["RequestVerificationToken"] = antiForgeryToken;
        }
        
        await _next(context);
    }
}

//use middleware
app.UseMiddleware<SetRequestVerificationHeaderMiddleware>();

When you enabled auto validation for GET requests, you need to pass the RequestVerificationToken header with your requests. Unless you'll get an HTTP 400 error. But if you're making your requests via Swagger you won't get that error because a request verification token is set on behalf of you in every request. (https://github.com/abpframework/abp/blob/dev/framework/src/Volo.Abp.Swashbuckle/wwwroot/swagger/ui/abp.swagger.js#L25-L29)

So try to send a request to one of your services via Postman or simply using a browser, you'll get the following error.

You can generate and set the cookie for your requests, useIAbpAntiForgeryManager.SetCookie() method.

I am closing the question since your problem seems resolved with this issue. Thanks @jhsanc

Hi @AlderCove, CMS Kit module does not support module entity extension for now. I've created an issue for it (#11525).

Is the list above the exhaustive list of modules that do support the feature?

In addition to this list, there is also ConfigureTenantManagement.

Hi @Anjaneyulu, I think you don't need to create a manual Anti Forgery Token Middleware. Instead, you can define AbpAntiForgeryOptions to enable auto validation for GET requests.

Configure<AbpAntiForgeryOptions>(options =>
{
    //By default only POST requests auto validate anti forgery tokens.
    //In other word "GET", "HEAD", "TRACE" and "OPTIONS" HTTP methods are ignored.
    
    options.AutoValidateIgnoredHttpMethods.Remove("GET"); //auto validate for GET requests
    
});

See CSRF Anti Forgery documentation for more information

Showing 1191 to 1200 of 1358 entries
Boost Your Development
ABP Live Training
Packages
See Trainings
Mastering ABP Framework Book
The Official Guide
Mastering
ABP Framework
Learn More
Mastering ABP Framework Book
Made with ❤️ on ABP v10.1.0-preview. Updated on November 04, 2025, 06:41