Base solution for your next web application

Activities of "MarkusBernhardt"

Prerequisites

  • What is your product version? 9.3.0
  • What is your product type (Angular or MVC)? Angular
  • What is product framework type (.net framework or .net core)? .net core

Hi, I discovered that classes that get a CreationTime property from FullAuditedEntity interface don't show that property in the Angular client. So what's the propper way of showing/getting that time in the Angular client in those cases?

Any success? We would also love to use Azure Vault

Ok. I finally got debugging to work. Yeah!

Now the problem is clear:

  • my service returns Task<IActionResult>
  • AbpExceptionFilter.HandleAndWrapException line 64 tests, whether the return type is a ObjectResult
  • AbpExceptionFilter.GetStatusCode that sets the correct error code is never reached

How can I change this behaviour?

This does not work for me. I'm on VS 2017 latest.

When I set a break point in my code, open the stack and try to open the calling method I get: Abp.pdb not loaded

Is there a way to debug into that code? I found some tickets on GitHub, but no working solution for me.

Not at the moment, but I am planning to add it, because this is a web API for external use.

I have created an input DTO with custom validation as described in [https://aspnetboilerplate.com/Pages/Documents/Validating-Data-Transfer-Objects?searchKey=validation])

When the validation fails the HTTP status code 500 is set. This is wrong. It should be 400.

From the logs:

WARN  2018-08-24 05:37:46,252 [3    ] Mvc.ExceptionHandling.AbpExceptionFilter - Method arguments are not valid! See ValidationErrors for details.
Abp.Runtime.Validation.AbpValidationException: Method arguments are not valid! See ValidationErrors for details.
   at Abp.Runtime.Validation.Interception.MethodInvocationValidator.ThrowValidationError()
   at Abp.Runtime.Validation.Interception.MethodInvocationValidator.Validate()
   at Abp.AspNetCore.Mvc.Validation.AbpValidationActionFilter.<OnActionExecutionAsync>d__3.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.<InvokeNextActionFilterAsync>d__10.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.Rethrow(ActionExecutedContext context)
   at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
   at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.<InvokeInnerFilterAsync>d__13.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.<InvokeNextExceptionFilterAsync>d__24.MoveNext()
WARN  2018-08-24 05:37:46,255 [3    ] Mvc.ExceptionHandling.AbpExceptionFilter - There are 2 validation errors:
WARN  2018-08-24 05:37:46,255 [3    ] Mvc.ExceptionHandling.AbpExceptionFilter - AssignedPersonId must be set if SendEmailToAssignedPerson is true!
WARN  2018-08-24 05:37:46,255 [3    ] Mvc.ExceptionHandling.AbpExceptionFilter - The Description field is required. (Description)
INFO  2018-08-24 05:37:46,258 [3    ] ore.Mvc.Internal.ControllerActionInvoker - Executed action B4Payment.SEPAexpress.Api.V2.Customers.CustomersAppService.CreateCustomer (B4Payment.SEPAexpress.Api.V2) in 434.6818ms
ERROR 2018-08-24 05:37:46,261 [3    ] Microsoft.AspNetCore.Server.Kestrel      - Connection id "0HLG9EBGV8MG4", Request id "0HLG9EBGV8MG4:00000004": An unhandled exception was thrown by the application.
Abp.Runtime.Validation.AbpValidationException: Method arguments are not valid! See ValidationErrors for details.
   bei Abp.Runtime.Validation.Interception.MethodInvocationValidator.ThrowValidationError()
   bei Abp.Runtime.Validation.Interception.MethodInvocationValidator.Validate()
   bei Abp.AspNetCore.Mvc.Validation.AbpValidationActionFilter.<OnActionExecutionAsync>d__3.MoveNext()
…

Any ideas what I do wrong?

Any more ideas? Anyone?

Hi Aaron!

I added the comments to both the implementation and the interface. But it does not work.

Is there anything else I have to do?

Best regards, Markus

How can I enable Swagger to use XML comments?

Something like:

options.IncludeXmlComments

in Startup.cs of Web.Host? But how does that work together with AbpModules?

Showing 1 to 10 of 14 entries