aspnetboilerplate: Exception in AbpUowPageFilter

Abp package version: 4.20 ANZ version: 6.61 Base framework: Net Core.

@ismcagdas In latest ABP update you released Razor pages support in ABP. It work perfect except in exception/error cases.

When exception happend in our app, app redirects user to error page. This page is razor page too. CTOR is execute well, but after that another exception rises in AbpUowPageFilter:

ERROR 2019-02-25 08:25:32,636 [17   ] e.Diagnostics.ExceptionHandlerMiddleware - An exception was thrown attempting to execute the error handler.
System.NullReferenceException: Object reference not set to an instance of an object.
   at Abp.AspNetCore.Mvc.Uow.AbpUowPageFilter.OnPageHandlerExecutionAsync(PageHandlerExecutingContext context, PageHandlerExecutionDelegate next) in D:\Github\aspnetboilerplate\src\Abp.AspNetCore\AspNetCore\Mvc\Uow\AbpUowPageFilter.cs:line 32
   at Microsoft.AspNetCore.Mvc.RazorPages.Internal.PageActionInvoker.InvokeNextPageFilterAsync()
   at Microsoft.AspNetCore.Mvc.RazorPages.Internal.PageActionInvoker.Rethrow(PageHandlerExecutedContext context)
   at Microsoft.AspNetCore.Mvc.RazorPages.Internal.PageActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
   at Microsoft.AspNetCore.Mvc.RazorPages.Internal.PageActionInvoker.InvokeInnerFilterAsync()
   at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.InvokeNextExceptionFilterAsync()
   at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.Rethrow(ExceptionContext context)
   at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
   at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.InvokeNextResourceFilter()
   at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.Rethrow(ResourceExecutedContext context)
   at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
   at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.InvokeFilterPipelineAsync()
   at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.InvokeAsync()
   at Microsoft.AspNetCore.Routing.EndpointMiddleware.Invoke(HttpContext httpContext)

Can you please look into that code. Is this bug or we missed something ? Thanks advance.

Edvin

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 18 (8 by maintainers)

Most upvoted comments

@sebitsi if you can create a repro using module zero core template, we can take a look.

How did you test it ? As i know there is no ABP razorpages startup template ?

So, provide a repro.

Hi @maliming . Can you assist the issue I am facing which is reported in https://github.com/aspnetboilerplate/aspnetboilerplate/issues/4319?