"andmattia" की गतिविधियाँ

उत्तर

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)

Hi

thanks for your suggestion but it cover only the login form. I need to customize backgroud, logo and other staff

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:

  • User callback from ABP.IO Identity will be identify with GUID and not with orginal user (ex email, user) so we need to duplicate user on ANZ db. Is it possibile to merge or reconcile it with existing user?
  • On ANZ login user must do a click on OpenId but the best option could be direct redirection to ABP.IO Identity. Is it possibile?

About community article if you want I/we can help you to wrinting it.

Can you share the log o from server?

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

Hi I start apps in this configuration:

For this configuration the endpoint on Angular via IS is https://localhost:44379/Account/login?response_type=id_token&client_id=anz_client&state=xxiEPGcW8Mx44MxvbDIz3orNCrTnFibn9ai7og7W%3BopenIdConnect%3D1&redirect_uri=https%3A%2F%2Flocalhost%3A4301%2Faccount%2Flogin&scope=openid%20profile&nonce=xxiEPGcW8Mx44MxvbDIz3orNCrTnFibn9ai7og7W

About HTTPS I don't think is the problem. ABP.IO angular app start on http://localhost:4200/ and works fine...

Below i copy&paste the log trace (is not the full stack because is too long to copy)

2022-04-04 08:34:39.193 +02:00 [INF] Request starting HTTP/2 GET https://localhost:44379/Account/login?response_type=id_token&client_id=anz_client&state=LhrF5VqDmgShGSgOzV6LYPlPve1I2z3E9qraHfLm%3BopenIdConnect%3D1&redirect_uri=https%3A%2F%2Flocalhost%3A4301%2Faccount%2Flogin&scope=openid%20profile&nonce=LhrF5VqDmgShGSgOzV6LYPlPve1I2z3E9qraHfLm - -
2022-04-04 08:34:39.627 +02:00 [DBG] Login Url: /Account/Login
2022-04-04 08:34:39.627 +02:00 [DBG] Login Return Url Parameter: ReturnUrl
2022-04-04 08:34:39.627 +02:00 [DBG] Logout Url: /Account/Logout
2022-04-04 08:34:39.627 +02:00 [DBG] ConsentUrl Url: /Consent
2022-04-04 08:34:39.627 +02:00 [DBG] Consent Return Url Parameter: returnUrl
2022-04-04 08:34:39.627 +02:00 [DBG] Error Url: /Account/Error
2022-04-04 08:34:39.627 +02:00 [DBG] Error Id Parameter: errorId
2022-04-04 08:34:39.841 +02:00 [INF] Executing endpoint '/Account/Login'
2022-04-04 08:34:39.885 +02:00 [INF] Route matched with {page = "/Account/Login", area = "", action = "", controller = ""}. Executing page /Account/Login
2022-04-04 08:34:39.887 +02:00 [INF] Skipping the execution of current filter as its not the most effective filter implementing the policy Microsoft.AspNetCore.Mvc.ViewFeatures.IAntiforgeryPolicy
2022-04-04 08:34:40.104 +02:00 [INF] Executing handler method Volo.Abp.Account.Public.Web.Pages.Account.LoginModel.OnGetAsync - ModelState is "Valid"
2022-04-04 08:34:40.201 +02:00 [INF] Executed handler method OnGetAsync, returned result Microsoft.AspNetCore.Mvc.RazorPages.PageResult.
2022-04-04 08:34:41.270 +02:00 [DBG] Added bundle 'Lepton.Global' to the page in 36.26 ms.
2022-04-04 08:34:41.327 +02:00 [DBG] Added bundle 'Lepton.Global' to the page in 8.41 ms.
2022-04-04 08:34:41.345 +02:00 [INF] Executed page /Account/Login in 1455.6307ms
2022-04-04 08:34:41.346 +02:00 [INF] Executed endpoint '/Account/Login'
2022-04-04 08:34:41.360 +02:00 [INF] Request finished HTTP/2 GET https://localhost:44379/Account/login?response_type=id_token&client_id=anz_client&state=LhrF5VqDmgShGSgOzV6LYPlPve1I2z3E9qraHfLm%3BopenIdConnect%3D1&redirect_uri=https%3A%2F%2Flocalhost%3A4301%2Faccount%2Flogin&scope=openid%20profile&nonce=LhrF5VqDmgShGSgOzV6LYPlPve1I2z3E9qraHfLm - - - 200 - text/html;+charset=utf-8 2166.2434ms
...

2022-04-04 08:35:04.268 +02:00 [INF] Request starting HTTP/2 POST https://localhost:44379/Account/login?response_type=id_token&client_id=anz_client&state=LhrF5VqDmgShGSgOzV6LYPlPve1I2z3E9qraHfLm%3BopenIdConnect%3D1&redirect_uri=https%3A%2F%2Flocalhost%3A4301%2Faccount%2Flogin&scope=openid%20profile&nonce=LhrF5VqDmgShGSgOzV6LYPlPve1I2z3E9qraHfLm application/x-www-form-urlencoded 334
2022-04-04 08:35:04.276 +02:00 [INF] CORS policy execution failed.
2022-04-04 08:35:04.276 +02:00 [INF] Request origin https://localhost:44379 does not have permission to access the resource.
2022-04-04 08:35:04.283 +02:00 [INF] No CORS policy found for the specified request.
2022-04-04 08:35:04.284 +02:00 [INF] Executing endpoint '/Account/Login'
2022-04-04 08:35:04.284 +02:00 [INF] Route matched with {page = "/Account/Login", area = "", action = "", controller = ""}. Executing page /Account/Login
2022-04-04 08:35:04.284 +02:00 [INF] Skipping the execution of current filter as its not the most effective filter implementing the policy Microsoft.AspNetCore.Mvc.ViewFeatures.IAntiforgeryPolicy
2022-04-04 08:35:04.490 +02:00 [INF] Executing handler method Volo.Abp.Account.Public.Web.Pages.Account.LoginModel.OnPostAsync - ModelState is "Valid"
2022-04-04 08:35:04.613 +02:00 [INF] Try to use LDAP for external authentication
2022-04-04 08:35:04.618 +02:00 [WRN] Ldap login feature is not enabled!
2022-04-04 08:35:07.022 +02:00 [DBG] Augmenting SignInContext
2022-04-04 08:35:07.023 +02:00 [DBG] Adding idp claim with value: local
2022-04-04 08:35:07.023 +02:00 [DBG] Adding auth_time claim with value: 1649054107
2022-04-04 08:35:07.031 +02:00 [INF] AuthenticationScheme: Identity.Application signed in.
2022-04-04 08:35:07.259 +02:00 [DBG] Added 0 entity changes to the current audit log
2022-04-04 08:35:07.275 +02:00 [DBG] Added 0 entity changes to the current audit log
2022-04-04 08:35:07.294 +02:00 [INF] {"Username":"admin","Provider":null,"ProviderUserId":null,"SubjectId":"8f9cbffc-a286-ffd5-3954-3a02d3218485","DisplayName":"admin","Endpoint":"UI","ClientId":null,"Category":"Authentication","Name":"User Login Success","EventType":"Success","Id":1000,"Message":null,"ActivityId":"0HMGM0KORJFEB:00000013","TimeStamp":"2022-04-04T06:35:07.0000000Z","ProcessId":36356,"LocalIpAddress":"::1:44379","RemoteIpAddress":"::1","$type":"UserLoginSuccessEvent"}
2022-04-04 08:35:07.294 +02:00 [INF] Executed handler method OnPostAsync, returned result Microsoft.AspNetCore.Mvc.RedirectResult.
2022-04-04 08:35:07.295 +02:00 [DBG] Added 0 entity changes to the current audit log
2022-04-04 08:35:07.296 +02:00 [INF] Executing RedirectResult, redirecting to /.
2022-04-04 08:35:07.296 +02:00 [INF] Executed page /Account/Login in 3011.8957ms
2022-04-04 08:35:07.296 +02:00 [INF] Executed endpoint '/Account/Login'
2022-04-04 08:35:07.297 +02:00 [DBG] Added 0 entity changes to the current audit log
2022-04-04 08:35:07.503 +02:00 [DBG] Added 0 entity changes to the current audit log
2022-04-04 08:35:07.503 +02:00 [DBG] Added 0 entity changes to the current audit log
2022-04-04 08:35:07.511 +02:00 [INF] Request finished HTTP/2 POST https://localhost:44379/Account/login?response_type=id_token&client_id=anz_client&state=LhrF5VqDmgShGSgOzV6LYPlPve1I2z3E9qraHfLm%3BopenIdConnect%3D1&redirect_uri=https%3A%2F%2Flocalhost%3A4301%2Faccount%2Flogin&scope=openid%20profile&nonce=LhrF5VqDmgShGSgOzV6LYPlPve1I2z3E9qraHfLm application/x-www-form-urlencoded 334 - 302 0 - 3242.9496ms

If you look into the log the redirect say

[08:40:29 INF] Executing RedirectResult, redirecting to /.

And not URL indecated on redirect_uri

Hi @gterdem

to reproduce this issue I write the steps:

  • create an empty solution on ANZ (.NetCore + Angular Vs 7.1.0)
  • create an empty solution on ABP pro (v 5.1.4) + UI Angular
  • enable OpenId on ANZ (in prev post you can see our configuration)
  • enable option on IS in ABP.IO solution
  • start Angualr+API (ANZ)+IS(ABP.IO)
  • Try to login from Angular (ANZ)

Our situation is this:

  • Login redirect to IS
  • Do login process correctly
  • No rederiction on ANZ site

Let me know if you need more information

Hi @albert

I tried with Https but situation still the same.

So I'm not agree with your answer "is related to a 3rd party component".

My question is releted how ANZ and ABP.IO can comunicate. I think is a big point to allow project migration from ANZ to ABP for many customer and is not cover in any guide or document at the moment.

I sended a full empty solution based on ANZ and ABP (without our customization) at @info to give you all information and data to try this issue.

Any way I write to info to get a quotation for this issue

Hi

could you please give us support on this issue?

98 प्रविष्टियों में 81 से 90 दिखा रहा है
Made with ❤️ on ABP v8.2.0-preview Updated on मार्च 25, 2024, 15:11