What do you mean by "OpenID server" ? is it AUTH server or the Azure AD.
if Azure AD,. Azure AD configuration is correct and it has come to the callback correctly.
if Auth Server, we don't have separate Auth server. it is built in to blazer project. How do we configure TokenEndpoint in the project ?
We can give the sample project but Azure AD is belong to our customer and it is only allow inside Norway. And also it is enable multifactor authentication.
Do you have running sample with Azure AD ?
* System.InvalidOperationException: An invalid request URI was provided. Either the request URI must be an absolute URI or BaseAddress must be set.
at System.Net.Http.HttpClient.PrepareRequestMessage(HttpRequestMessage request)
at System.Net.Http.HttpClient.SendAsync(HttpRequestMessage request, HttpCompletionOption completionOption, CancellationToken cancellationToken)
at Microsoft.AspNetCore.Authentication.OpenIdConnect.OpenIdConnectHandler.RedeemAuthorizationCodeAsync(OpenIdConnectMessage tokenEndpointRequest)
at Microsoft.AspNetCore.Authentication.OpenIdConnect.OpenIdConnectHandler.HandleRemoteAuthenticateAsync()
* Microsoft.AspNetCore.Authentication.AuthenticationFailureException: An error was encountered while handling the remote login.
---> System.InvalidOperationException: An invalid request URI was provided. Either the request URI must be an absolute URI or BaseAddress must be set.
at System.Net.Http.HttpClient.PrepareRequestMessage(HttpRequestMessage request)
at System.Net.Http.HttpClient.SendAsync(HttpRequestMessage request, HttpCompletionOption completionOption, CancellationToken cancellationToken)
at Microsoft.AspNetCore.Authentication.OpenIdConnect.OpenIdConnectHandler.RedeemAuthorizationCodeAsync(OpenIdConnectMessage tokenEndpointRequest)
at Microsoft.AspNetCore.Authentication.OpenIdConnect.OpenIdConnectHandler.HandleRemoteAuthenticateAsync()
--- End of inner exception stack trace ---
at Microsoft.AspNetCore.Authentication.RemoteAuthenticationHandler`1.HandleRequestAsync()
at Volo.Abp.Account.Public.Web.ExternalProviders.AbpAccountAuthenticationRequestHandler`2.HandleRequestAsync()
at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)
at Volo.Abp.AspNetCore.Security.AbpSecurityHeadersMiddleware.InvokeAsync(HttpContext context, RequestDelegate next)
at Microsoft.AspNetCore.Builder.UseMiddlewareExtensions.InterfaceMiddlewareBinder.<>c__DisplayClass2_0.<<CreateMiddleware>b__0>d.MoveNext()
--- End of stack trace from previous location ---
at Volo.Abp.AspNetCore.Tracing.AbpCorrelationIdMiddleware.InvokeAsync(HttpContext context, RequestDelegate next)
at Microsoft.AspNetCore.Builder.UseMiddlewareExtensions.InterfaceMiddlewareBinder.<>c__DisplayClass2_0.<<CreateMiddleware>b__0>d.MoveNext()
--- End of stack trace from previous location ---
at Microsoft.AspNetCore.Localization.RequestLocalizationMiddleware.Invoke(HttpContext context)
at Microsoft.AspNetCore.RequestLocalization.AbpRequestLocalizationMiddleware.InvokeAsync(HttpContext context, RequestDelegate next)
at Microsoft.AspNetCore.Builder.UseMiddlewareExtensions.InterfaceMiddlewareBinder.<>c__DisplayClass2_0.<<CreateMiddleware>b__0>d.MoveNext()
--- End of stack trace from previous location ---
at Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddlewareImpl.Invoke(HttpContext context)
* **Steps to reproduce the issue**:
* Setup Azure AD connection
.AddOpenIdConnect("AzureOpenId", "Azure AD", options =>
{
options.ResponseType = OpenIdConnectResponseType.CodeIdToken;
options.RequireHttpsMetadata = false;
options.SaveTokens = false;
options.GetClaimsFromUserInfoEndpoint = false;
options.Scope.Add("email");
options.ClaimActions.MapJsonKey(ClaimTypes.NameIdentifier, "sub");
options.SignInScheme = IdentityConstants.ExternalScheme;
options.CallbackPath = "/callback";
options.TokenValidationParameters = new TokenValidationParameters
{
ValidateIssuer = false,
ValidateAudience = false,
// NameClaimType = "name",
ValidateIssuerSigningKey = false,
RequireSignedTokens = false,
SignatureValidator = delegate (string token, TokenValidationParameters parameters)
{
var jwt = new JsonWebToken(token);
return jwt;
}
};
})
.WithDynamicOptions<OpenIdConnectOptions, OpenIdConnectHandler>(
"AzureOpenId",
options =>
{
options.WithProperty(x => x.Authority);
options.WithProperty(x => x.ClientId);
options.WithProperty(x => x.ClientSecret, isSecret: true);
}
Exception occur after login and came back to Call back.
Hi,
Thank you for the update.
We have custom code for mapping and it has introduce the issue it seems.
Regards, Wasantha.
We are getting below error and can't open Users (/identity/users) page if there is any value in LockoutEnd column in the AbpUsers Table.
Please check and let us know how to fix it.
2024-04-06 10:23:29.2081|0|ERROR|Volo.Abp.Identity.Pro.Blazor.Pages.Identity.UserManagement|Error mapping types.
Mapping types:
List`1 -> List`1
System.Collections.Generic.List`1[[Volo.Abp.Identity.IdentityUser, Volo.Abp.Identity.Domain, Version=7.0.3.0, Culture=neutral, PublicKeyToken=null]] -> System.Collections.Generic.List`1[[Volo.Abp.Identity.IdentityUserDto, Volo.Abp.Identity.Pro.Application.Contracts, Version=7.0.3.0, Culture=neutral, PublicKeyToken=null]] AutoMapper.AutoMapperMappingException: Error mapping types.
Mapping types:
List`1 -> List`1
System.Collections.Generic.List`1[[Volo.Abp.Identity.IdentityUser, Volo.Abp.Identity.Domain, Version=7.0.3.0, Culture=neutral, PublicKeyToken=null]] -> System.Collections.Generic.List`1[[Volo.Abp.Identity.IdentityUserDto, Volo.Abp.Identity.Pro.Application.Contracts, Version=7.0.3.0, Culture=neutral, PublicKeyToken=null]]
---> AutoMapper.AutoMapperMappingException: Error mapping types.
Mapping types:
IdentityUser -> IdentityUserDto
Volo.Abp.Identity.IdentityUser -> Volo.Abp.Identity.IdentityUserDto
Type Map configuration:
IdentityUser -> IdentityUserDto
Volo.Abp.Identity.IdentityUser -> Volo.Abp.Identity.IdentityUserDto
Destination Member:
LockoutEnd
---> AutoMapper.AutoMapperMappingException: Missing type map configuration or unsupported mapping.
Mapping types:
DateTimeOffset -> DateTime
System.DateTimeOffset -> System.DateTime
Destination Member:
LockoutEnd
at lambda_method11622(Closure, DateTimeOffset, DateTime, ResolutionContext)
at lambda_method11621(Closure, Object, List`1, ResolutionContext)
--- End of inner exception stack trace ---
at lambda_method11621(Closure, Object, List`1, ResolutionContext)
--- End of inner exception stack trace ---
at lambda_method11621(Closure, Object, List`1, ResolutionContext)
at Volo.Abp.ObjectMapping.DefaultObjectMapper.Map[TSource,TDestination](TSource source)
at Volo.Abp.Identity.IdentityUserAppService.GetListAsync(GetIdentityUsersInput input)
at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo)
at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapterWithReturnValue`1.ProceedAsync()
at Volo.Abp.Authorization.AuthorizationInterceptor.InterceptAsync(IAbpMethodInvocation invocation)
at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter`1.InterceptAsync[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo, Func`3 proceed)
at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo)
at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapterWithReturnValue`1.ProceedAsync()
at Volo.Abp.GlobalFeatures.GlobalFeatureInterceptor.InterceptAsync(IAbpMethodInvocation invocation)
at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter`1.InterceptAsync[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo, Func`3 proceed)
at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo)
at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapterWithReturnValue`1.ProceedAsync()
at Volo.Abp.Auditing.AuditingInterceptor.InterceptAsync(IAbpMethodInvocation invocation)
at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter`1.InterceptAsync[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo, Func`3 proceed)
at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo)
at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapterWithReturnValue`1.ProceedAsync()
at Volo.Abp.Validation.ValidationInterceptor.InterceptAsync(IAbpMethodInvocation invocation)
at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter`1.InterceptAsync[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo, Func`3 proceed)
at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo)
at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapterWithReturnValue`1.ProceedAsync()
at Volo.Abp.Uow.UnitOfWorkInterceptor.InterceptAsync(IAbpMethodInvocation invocation)
at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter`1.InterceptAsync[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo, Func`3 proceed)
at Volo.Abp.BlazoriseUI.AbpCrudPageBase`10.GetEntitiesAsync()
Steps to reproduce the issue:
We have stared getting "Method not found" exception on Almost all the lookups. This is autogenerated code by suite working find for more than year. We didn't even touched the code. Please check and let us know.
2023-11-01 19:54:30.5756|0|ERROR|ApxSystems.TaPlus.Blazor.Pages.Pricelists|Method not found: 'System.Threading.Tasks.Task`1<System.Collections.Generic.List`1<!!0>> System.Linq.Dynamic.Core.DynamicEnumerableAsyncExtensions.ToDynamicListAsync(System.Collections.IEnumerable)'. System.MissingMethodException: Method not found: 'System.Threading.Tasks.Task`1<System.Collections.Generic.List`1<!!0>> System.Linq.Dynamic.Core.DynamicEnumerableAsyncExtensions.ToDynamicListAsync(System.Collections.IEnumerable)'.
at ApxSystems.TaPlus.Pricelists.PricelistsAppService.GetTransportServiceLookupAsync(LookupRequestDto input)
at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[TStateMachine](TStateMachine& stateMachine)
at ApxSystems.TaPlus.Pricelists.PricelistsAppService.GetTransportServiceLookupAsync(LookupRequestDto input)
at Castle.Proxies.Invocations.IPricelistsAppService_GetTransportServiceLookupAsync.InvokeMethodOnTarget()
at Castle.DynamicProxy.AbstractInvocation.Proceed()
at Castle.DynamicProxy.AbstractInvocation.ProceedInfo.Invoke()
at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo)
at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapterWithReturnValue`1.ProceedAsync()
at Volo.Abp.Authorization.AuthorizationInterceptor.InterceptAsync(IAbpMethodInvocation invocation)
at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter`1.InterceptAsync[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo, Func`3 proceed)
at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo)
at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapterWithReturnValue`1.ProceedAsync()
at Volo.Abp.GlobalFeatures.GlobalFeatureInterceptor.InterceptAsync(IAbpMethodInvocation invocation)
at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter`1.InterceptAsync[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo, Func`3 proceed)
at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo)
at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapterWithReturnValue`1.ProceedAsync()
at Volo.Abp.Auditing.AuditingInterceptor.InterceptAsync(IAbpMethodInvocation invocation)
at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter`1.InterceptAsync[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo, Func`3 proceed)
at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo)
at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapterWithReturnValue`1.ProceedAsync()
at Volo.Abp.Validation.ValidationInterceptor.InterceptAsync(IAbpMethodInvocation invocation)
at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter`1.InterceptAsync[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo, Func`3 proceed)
at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo)
at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapterWithReturnValue`1.ProceedAsync()
at Volo.Abp.Uow.UnitOfWorkInterceptor.InterceptAsync(IAbpMethodInvocation invocation)
at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter`1.InterceptAsync[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo, Func`3 proceed)
at ApxSystems.TaPlus.Blazor.Pages.Pricelists.GetTransportServiceCollectionLookupAsync(String newValue) in D:\Projects\APXApps\IntelliTrack2\ApxSystems.TaPlus\src\ApxSystems.TaPlus.Blazor\Pages\Pricelists.razor.cs:line 343
private async Task GetTransportServiceCollectionLookupAsync(string newValue = null)
{
try
{
//Line 343
TransportServicesCollection = (await PricelistsAppService.GetTransportServiceLookupAsync(new LookupRequestDto { Filter = newValue })).Items;
}
catch (Exception ex)
{
await UiMessageService.Error(L["Message:DefultError"]);
Logger.LogError("Error in GetTransportServiceCollectionLookupAsync | Pricelists");
Logger.LogException(ex);
}
}
//PricelistsAppService
public virtual async Task<PagedResultDto<LookupDto<Guid>>> GetTransportServiceLookupAsync(LookupRequestDto input)
{
var query = (await _transportServiceRepository.GetQueryableAsync())
.WhereIf(!string.IsNullOrWhiteSpace(input.Filter),
x => x.Name != null &&
x.Name.Contains(input.Filter));
var lookupData = await query.PageBy(input.SkipCount, input.MaxResultCount).ToDynamicListAsync<TransportService>();
var totalCount = query.Count();
return new PagedResultDto<LookupDto<Guid>>
{
TotalCount = totalCount,
Items = ObjectMapper.Map<List<TransportService>, List<LookupDto<Guid>>>(lookupData)
};
}
Hello,
We are doing UI customization of LiptonX theme in our blazer server project. We need to override some of the styles in layout-bundle.css. How do we add our custom.css file to the project?
We can't override with global-styles files because it is linked before the layout-bundle.css.
Regards, Wasantha.