Hi
this is the code
public class GetLayoutTemplateInput : CustomPagedAndSortedInputDto
{
public GetLayoutTemplateInput() : base()
{
GridDefinitionType = typeof(LayoutTemplateDto);
}
public string Filter { get; set; }
}
[Serializable]
public class CustomPagedAndSortedInputDto : PagedAndSortedResultRequestDto, IFilteredResultRequest
{
public FilterDto[] Filters { get; set; }
public Type GridDefinitionType { get; set; }
public virtual string GetDefaultSorting()
{
...
}
public override IEnumerable<ValidationResult> Validate(ValidationContext validationContext)
{
//Set default sorting
...
}
}
}
public class FilterDto : IFilter
{
public string Field { get; set; }
public string Operator { get; set; }
public object Value { get; set; }
public string GetFullObject()
{
var q = this.Field.UppercaseFirst();
if (!this.BaseObject.IsNullOrWhiteSpace())
{
...
}
return q;
}
public string BaseObject { get; set; }
public string PropertyName { get; set; }
public string Logic { get; set; }
public IFilter[] Filters { get; set; }
}
Hi
this is the full stack log for this issue
2022-04-13 12:21:09.582 +02:00 [INF] Executing action method Dm.DynamicTemplate.LayoutTemplateController.ProvaInput (Dm.DynamicTemplate.HttpApi) - Validation state: "Valid"
2022-04-13 12:21:11.093 +02:00 [ERR] ---------- RemoteServiceErrorInfo ----------
{
"code": null,
"message": "An internal error occurred during your request!",
"details": null,
"data": {},
"validationErrors": null
}
2022-04-13 12:21:11.093 +02:00 [ERR] Property accessor 'DeclaringMethod' on object 'System.RuntimeType' threw the following exception:'Method may only be called on a Type for which Type.IsGenericParameter is true.'
System.Reflection.TargetInvocationException: Property accessor 'DeclaringMethod' on object 'System.RuntimeType' threw the following exception:'Method may only be called on a Type for which Type.IsGenericParameter is true.'
---> System.InvalidOperationException: Method may only be called on a Type for which Type.IsGenericParameter is true.
at System.RuntimeType.get_DeclaringMethod()
--- End of inner exception stack trace ---
at System.ComponentModel.ReflectPropertyDescriptor.GetValue(Object component)
at Volo.Abp.Validation.DataAnnotationObjectValidationContributor.ValidateObjectRecursively(List`1 errors, Object validatingObject, Int32 currentDepth)
at Volo.Abp.Validation.DataAnnotationObjectValidationContributor.ValidateObjectRecursively(List`1 errors, Object validatingObject, Int32 currentDepth)
at Volo.Abp.Validation.DataAnnotationObjectValidationContributor.AddErrorsAsync(ObjectValidationContext context)
at Volo.Abp.Validation.ObjectValidator.GetErrorsAsync(Object validatingObject, String name, Boolean allowNull)
at Volo.Abp.Validation.MethodInvocationValidator.AddMethodParameterValidationErrorsAsync(IAbpValidationResult context, ParameterInfo parameterInfo, Object parameterValue)
at Volo.Abp.Validation.MethodInvocationValidator.AddMethodParameterValidationErrorsAsync(MethodInvocationValidationContext context)
at Volo.Abp.Validation.MethodInvocationValidator.ValidateAsync(MethodInvocationValidationContext context)
at Volo.Abp.Validation.ValidationInterceptor.ValidateAsync(IAbpMethodInvocation invocation)
at Volo.Abp.Validation.ValidationInterceptor.InterceptAsync(IAbpMethodInvocation invocation)
at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter`1.InterceptAsync(IInvocation invocation, IInvocationProceedInfo proceedInfo, Func`3 proceed)
at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous(IInvocation invocation, IInvocationProceedInfo proceedInfo)
at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapter.ProceedAsync()
at Volo.Abp.Auditing.AuditingInterceptor.ProceedByLoggingAsync(IAbpMethodInvocation invocation, IAuditingHelper auditingHelper, IAuditLogScope auditLogScope)
at Volo.Abp.Auditing.AuditingInterceptor.InterceptAsync(IAbpMethodInvocation invocation)
at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter`1.InterceptAsync(IInvocation invocation, IInvocationProceedInfo proceedInfo, Func`3 proceed)
at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous(IInvocation invocation, IInvocationProceedInfo proceedInfo)
at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapter.ProceedAsync()
at Volo.Abp.Uow.UnitOfWorkInterceptor.InterceptAsync(IAbpMethodInvocation invocation)
at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter`1.InterceptAsync(IInvocation invocation, IInvocationProceedInfo proceedInfo, Func`3 proceed)
at lambda_method1367(Closure , Object )
at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.AwaitableResultExecutor.Execute(IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeActionMethodAsync>g__Logged|12_1(ControllerActionInvoker invoker)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeNextActionFilterAsync>g__Awaited|10_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeInnerFilterAsync()
--- End of stack trace from previous location ---
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeNextExceptionFilterAsync>g__Awaited|26_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
[Area(DynamicTemplateRemoteServiceConsts.ModuleName)]
[RemoteService(Name = DynamicTemplateRemoteServiceConsts.RemoteServiceName)]
[Route("api/custom/layout-template")]
public class LayoutTemplateController : DynamicTemplateController, ILayoutTemplateAppService
{
protected ILayoutTemplateAppService LayoutTemplateAppService { get; }
public LayoutTemplateController(ILayoutTemplateAppService layoutTemplateAppService)
{
LayoutTemplateAppService = layoutTemplateAppService;
}
[HttpPost]
[Route("give-layout-templates")]
public Task<PagedResultDto<LayoutTemplateDto>> GiveLayoutTemplates(GetLayoutTemplateInput input)
{
return LayoutTemplateAppService.GiveLayoutTemplates(input);
}
This generate an error
2022-04-13 12:21:09.582 +02:00 [INF] Executing action method Dm.DynamicTemplate.LayoutTemplateController.ProvaInput (Dm.DynamicTemplate.HttpApi) - Validation state: "Valid"
2022-04-13 12:21:11.093 +02:00 [ERR] ---------- RemoteServiceErrorInfo ----------
{
"code": null,
"message": "An internal error occurred during your request!",
"details": null,
"data": {},
"validationErrors": null
}
2022-04-13 12:21:11.093 +02:00 [ERR] Property accessor 'DeclaringMethod' on object 'System.RuntimeType' threw the following exception:'Method may only be called on a Type for which Type.IsGenericParameter is true.'
System.Reflection.TargetInvocationException: Property accessor 'DeclaringMethod' on object 'System.RuntimeType' threw the following exception:'Method may only be called on a Type for which Type.IsGenericParameter is true.'
---> System.InvalidOperationException: Method may only be called on a Type for which Type.IsGenericParameter is true.
at System.RuntimeType.get_DeclaringMethod()
--- End of inner exception stack trace ---
if I use the code below in Http APi (importing Application Module or in Host Module) the API works fine (I try in 5.1.4 and 5.2.0) this happen only with this input object. The inpunt object exted a class that extend PagedAndSortedResultRequestDto. Internally I have an array object the same type.
public class Filter {
public string Name {get;set;}
public Filter[] Filters {get;set;}
}
Configure<AbpAspNetCoreMvcOptions>(options =>
{
options.ConventionalControllers.Create(typeof(DynamicTemplateApplicationModule).Assembly, opts =>
{
opts.RootPath = "custom/";
});
});```
Hi
thanks for your suggestion but it cover only the login form. I need to customize backgroud, logo and other staff
Hi
we need to change the schema color and other staff on Login Page provided from Identity Server.
How can do that?
it seems a problem related CORS
I found this on DevExpress Devexpress report using Angular
Hi @gterdem
I've try and I confirm that work on ANZ lastest and on our target version 7.1.0.
I found some little improve on flow (es port, url) but I think it's a very great artile to allow customers move forward from ANZ to ABP.IO.
So I test we my team and we found 2 open pont:
About community article if you want I/we can help you to wrinting it.
Can you share the log o from server?
Hi
In our migration process we want to convert our module develop on to Anz to abp.io
I start from angular module where I found a module sec and dev-app arc.
On root i use yarn build to create a module and after this step I use yarn add './dist/module/ to use on dev app.
I have some issue because some times my component or abp are non valid.
Exist a full example to explain all thebflow ?
Hi
Yes. ANZ 7.1.0 (NetCore 2.2).
I do the same test with lastes ANZ but I'm still focus on 7.1.0 version