Activities of "liangshiwei"

Answer

Unfortunately, it can't be done.

But you can use Interceptor; You can use the interceptor method and get the return value. Here is a video about how to write and use it. https://abp.io/video-courses/essentials/interception

Hi,

I'm not sure if it has anything to do with this, I refunded your ticket.

Answer

Hi,

It is added to the Audit log system globally, it will be activated for every app service method

Answer

Hi,

The httpContext.Response.Body is a stream; you can read it as a string and write it into a text file.

You can give it a try.

PS, don't forget to configure the AbpAuditingOptions to add ResponseAuditLogContributor

Hi,

You can configure the AbpExceptionHandlingOptions

https://docs.abp.io/en/abp/latest/Exception-Handling#abpexceptionhandlingoptions

if(env == ....)
{
    Configure<AbpExceptionHandlingOptions>(options =>
    {
        options.SendExceptionsDetailsToClients = true;
        options.SendStackTraceToClients = true;
    });
}

Hi,

It makes sense how to add permissions but what we need help with is where do we apply the permissions on a file by file basis?

You can override the DirectoryDescriptorAppService and FileDescriptorAppService services.

For example:

[ExposeServices(typeof(IDirectoryDescriptorRepository))]
[Dependency(ReplaceServices = true)]
public class MyDirectoryDescriptorAppService : DirectoryDescriptorAppService
{
    public MyDirectoryDescriptorAppService(IDirectoryManager directoryManager, IFileManager fileManager, IDirectoryDescriptorRepository directoryDescriptorRepository, IFileDescriptorRepository fileDescriptorRepository, IOptions<FileIconOption> fileIconOption) : base(directoryManager, fileManager, directoryDescriptorRepository, fileDescriptorRepository, fileIconOption)
    {
    }

    public override async Task<ListResultDto<DirectoryDescriptorInfoDto>> GetListAsync(Guid? parentId)
    {
        var list = await base.GetListAsync(parentId);
        foreach (var item in list.Items)
        {
            // check permission here
        }
    }
}

How do we mark a file as confidential for example and then based on a permission filter it out from being viewable in the directory tree?

You can add an entity action to the action menu for an entity to make file as confidential

https://docs.abp.io/en/abp/latest/UI/Blazor/Entity-Action-Extensions

Answer

Hi,

You can consider creating an AuditLogContributor. https://docs.abp.io/en/abp/latest/Audit-Logging#audit-log-contributors

For example:

public class ResponseAuditLogContributor : AuditLogContributor, ITransientDependency
{
    public ResponseAuditLogContributor()
    {
    }
    
    public override void PostContribute(AuditLogContributionContext context)
    {
        var httpContext = context.ServiceProvider.GetRequiredService<IHttpContextAccessor>().HttpContext;
        if (httpContext == null)
        {
            return;
        }

        // read and log response body to audit log
        //httpContext.Response.Body;
    }
}

It works for me:

Hi,

Could you please share the full logs? thanks. my email is shiwei.liang@volosoft.com

You can try updating your Ocelot config

{
    
    "DownstreamPathTemplate": "/signalr-hubs/{everything}",
    "DownstreamScheme": "ws", // or wss
    "DownstreamHostAndPorts": [
        {
        "Host": "localhost",
        "Port": 44878
        }
    ],
    "UpstreamPathTemplate": "/signalr-hubs/{everything}"
}
Showing 2281 to 2290 of 6693 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 07, 2025, 08:20