Activities of "liangshiwei"

Try:

The web.public does not create API dynamic proxy. if you want to use API dynamic proxy. you can try:

Configure<AbpAspNetCoreMvcOptions>(options =>
{
    options.ConventionalControllers.Create(typeof(MyProjectNameApplicationModule).Assembly);
});

Recommend you create a sparate application service layer for the web.public like : Application.Public

CreateContainerIfNotExists (bool): Default value is false, If a container does not exist in azure, AzureBlobProvider will try to create it.

Set CreateContainerIfNotExists value to true otherwise you need to pre-create the BLOB container in Azure yourself

Hi,

I make an example for you: https://github.com/realLiangshiwei/Qa868

Hi,

You can use the ABP Suite to install file management module to your project.

The file management provided some repositories: https://docs.abp.io/en/commercial/latest/modules/file-management#repositories

Hi,

Actualy, the modal page and ParentPage are same page. modal pages can call variables from the parent page. you need to change the variable scope of the parent page. like

parent page.

var modal;
$(function(){
   modal = new abp.ModalManager()....
})

modal page:

$(function(){

   modal.setResult....
})

HI,

We will fix it by https://github.com/abpframework/abp/pull/7804

For now , you can try:

public class MyAbpUowActionFilter : IAsyncActionFilter, ITransientDependency
{
    public async Task OnActionExecutionAsync(ActionExecutingContext context, ActionExecutionDelegate next)
    {
        if (!context.ActionDescriptor.IsControllerAction())
        {
            await next();
            return;
        }

        var methodInfo = context.ActionDescriptor.GetMethodInfo();
        var unitOfWorkAttr = UnitOfWorkHelper.GetUnitOfWorkAttributeOrNull(methodInfo);

        context.HttpContext.Items["_AbpActionInfo"] = new AbpActionInfoInHttpContext
        {
            IsObjectResult = context.ActionDescriptor.HasObjectResult()
        };

        if (unitOfWorkAttr?.IsDisabled == true)
        {
            await next();
            return;
        }

        var options = CreateOptions(context, unitOfWorkAttr);

        var unitOfWorkManager = context.HttpContext.RequestServices.GetRequiredService<IUnitOfWorkManager>();

        //Trying to begin a reserved UOW by AbpUnitOfWorkMiddleware
        if (unitOfWorkManager.TryBeginReserved(UnitOfWork.UnitOfWorkReservationName, options))
        {
            var result = await next();
            if (!Succeed(result))
            {
                await RollbackAsync(context, unitOfWorkManager);
            }

            return;
        }

        //Begin a new, independent unit of work
        using (var uow = unitOfWorkManager.Begin(options))
        {
            var result = await next();
            if (Succeed(result))
            {
                await uow.CompleteAsync(context.HttpContext.RequestAborted);
            }
            else
            {
                await uow.RollbackAsync(context.HttpContext.RequestAborted);
            }
        }
    }

    private AbpUnitOfWorkOptions CreateOptions(ActionExecutingContext context,
        UnitOfWorkAttribute unitOfWorkAttribute)
    {
        var options = new AbpUnitOfWorkOptions();

        unitOfWorkAttribute?.SetOptions(options);

        if (unitOfWorkAttribute?.IsTransactional == null)
        {
            var abpUnitOfWorkDefaultOptions =
                context.HttpContext.RequestServices.GetRequiredService<IOptions<AbpUnitOfWorkDefaultOptions>>().Value;
            options.IsTransactional = abpUnitOfWorkDefaultOptions.CalculateIsTransactional(
                autoValue: !string.Equals(context.HttpContext.Request.Method, HttpMethod.Get.Method,
                    StringComparison.OrdinalIgnoreCase)
            );
        }

        return options;
    }

    private async Task RollbackAsync(ActionExecutingContext context, IUnitOfWorkManager unitOfWorkManager)
    {
        var currentUow = unitOfWorkManager.Current;
        if (currentUow != null)
        {
            await currentUow.RollbackAsync(context.HttpContext.RequestAborted);
        }
    }

    private static bool Succeed(ActionExecutedContext result)
    {
        return result.Exception == null || result.ExceptionHandled;
    }
}
Configure<MvcOptions>(options =>
{
    options.Filters.RemoveAll(x => x.GetType() == typeof(AbpUowActionFilter));
    options.Filters.Add<MyAbpUowActionFilter>();
});

AbpUowPageFilter also.

Hi,

May be you can use proxifier to proxy abp suite.

Hi,

You should use file management module, the blob system is a low-level module.

Hi,

https://github.com/PontusLjungdahl/abpbook2

Please remove the repo on Github, because the source code has your linence key, it's not safe for you.

Hi,

selectStaffModal is not defined

You need to change the scope of the variable.

Showing 5251 to 5260 of 5965 entries
Made with ❤️ on ABP v9.1.0-preview. Updated on November 11, 2024, 11:11