Activities of "maliming"

It may be difficult for me to understand your project in a short time.

If possible, please use the template project to reproduce the problem. Thanks.

Answer

I mean the previous: https://support.abp.io/QA/Questions/627?_se=bGltaW5nLm1hQHZvbG9zb2Z0LmNvbQ==#answer-85980db3-c7b4-3bf5-3859-39fd01fd03c5

No problem. : )

hi

Can you copy the code form https://github.com/abpframework/abp/blob/dev/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/Response/AbpNoContentActionFilter.cs ?

hi

I updated the code, Can you copy and retry?

https://support.abp.io/QA/Questions/1870?_se=bGltaW5nLm1hQHZvbG9zb2Z0LmNvbQ==#answer-a54796dc-1726-c91c-67b4-39ff13281afb

We will fix this in next patch version. https://github.com/abpframework/abp/pull/10074

Answer

hi

You have not follow abp design to develop, so there is no good approach for abp, you can continue to test your design.

hi

There are many ways to set the requested tenant. Please note that CurrentUserTenantResolveContributor should always be the first contributor for the security.

https://docs.abp.io/en/abp/latest/Multi-Tenancy#default-tenant-resolvers

hi

I think we should not change the path, IIS will automatically handle it.

We seem to be stuck in the X Y problem. https://xyproblem.info/

Answer

hi

https://github.com/abpframework/abp-samples/tree/master/DomainTenantResolver https://github.com/abpframework/abp-samples/blob/master/DomainTenantResolver/NG/aspnet-core/src/BookStore.HttpApi.Host/BookStoreHttpApiHostModule.cs#L58-L64

hi

I will fix this in Abp. You can use code below to fix the problem temporary.

public override void ConfigureServices(ServiceConfigurationContext context)
{
    var configuration = context.Services.GetConfiguration();
    var hostingEnvironment = context.Services.GetHostingEnvironment();

    context.Services.Configure<MvcOptions>(options =>
    {
        options.Filters.ReplaceOne(x => x is ServiceFilterAttribute && x.As<ServiceFilterAttribute>().ServiceType  == typeof(AbpNoContentActionFilter),
            metadata => new ServiceFilterAttribute(typeof(MyNoContentActionFilter)) { Order = 0 });
    });
}

using System.Net;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc.Abstractions;
using Microsoft.AspNetCore.Mvc.Filters;
using Volo.Abp.DependencyInjection;

namespace Volo.Abp.AspNetCore.Mvc.Response
{
    public class MyNoContentActionFilter : IAsyncActionFilter, ITransientDependency
    {
        public async Task OnActionExecutionAsync(ActionExecutingContext context, ActionExecutionDelegate next)
        {
            if (!context.ActionDescriptor.IsControllerAction())
            {
                await next();
                return;
            }

            await next();

            if (!context.HttpContext.Response.HasStarted &&
                context.HttpContext.Response.StatusCode == (int)HttpStatusCode.OK &&
                context.Result == null)
            {
                var returnType = context.ActionDescriptor.GetReturnType();
                if (returnType == typeof(Task) || returnType == typeof(void))
                {
                    context.HttpContext.Response.StatusCode = (int)HttpStatusCode.NoContent;
                }
            }
        }
    }
}
Showing 10251 to 10260 of 11550 entries
Learn More, Pay Less
33% OFF
All Trainings!
Get Your Deal
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 December 25, 2025, 06:16
1
ABP Assistant
🔐 You need to be logged in to use the chatbot. Please log in first.