hi
Can you check the browser's console? There may be some errors/warnings.
hi
try to use your authserver.pfx
Please use dotnet dev-certs https -v -ep authserver.pfx -p 6a511cc3-738b-426c-ab04-5d236fe77a1c command to generate the pfx file if there is no such file.
public override void PreConfigureServices(ServiceConfigurationContext context)
{
var hostingEnvironment = context.Services.GetHostingEnvironment();
var configuration = context.Services.GetConfiguration();
PreConfigure(builder =>
{
builder.AddValidation(options =>
{
options.AddAudiences("AccountService");
options.UseLocalServer();
options.UseAspNetCore();
});
});
PreConfigure(options =>
{
options.AddDevelopmentEncryptionAndSigningCertificate = false;
});
PreConfigure(builder =>
{
builder.AddSigningCertificate(GetSigningCertificate(hostingEnvironment, configuration));
builder.AddEncryptionCertificate(GetSigningCertificate(hostingEnvironment, configuration));
builder.SetIssuer(new Uri(configuration["AuthServer:Authority"]));
});
}
hi
Can you share a project? I will check it locally.
liming.ma@volosoft.com
hi
Can you share a project? I will check it locally.
liming.ma@volosoft.com
hi
Can you share your project source code? liming.ma@volosoft.com
hi
https://docs.abp.io/en/commercial/latest/migration-guides/openIddict-step-by-step
hi
You can delete existing migration files and recreate one.
hi
Please share the full logs.
hi
[Dependency(ReplaceServices = true)]
[ExposeServices(typeof(IAppUrlProvider))]
using System.Threading.Tasks;
using Volo.Abp.DependencyInjection;
using Volo.Abp.UI.Navigation.Urls;
namespace CompuCare.Providers;
[Dependency(ReplaceServices = true)]
[ExposeServices(typeof(IAppUrlProvider))]
public class CustomAppUrlProvider : IAppUrlProvider, ITransientDependency
{
public bool IsRedirectAllowedUrl(string url)
{
return true;
}
public async Task<string> GetUrlAsync(string appName, string urlName)
{
return default;
}
public async Task<string> GetUrlOrNullAsync(string appName, string urlName)
{
return default;
}
public async Task<string> NormalizeUrlAsync(string url)
{
return default;
}
}
hi
You can try to override the App.razor of Lepton theme.
Add <p>You are not authorized to access this resource.</p
We will fix this in next version.
@using Microsoft.Extensions.Options
@using Microsoft.Extensions.Localization
@using global::Localization.Resources.AbpUi
@using Volo.Abp.AspNetCore.Components.Web.LeptonTheme.Components.ApplicationLayout
@using Volo.Abp.AspNetCore.Components.Web.Theming.Routing
@inject IOptions<AbpRouterOptions> RouterOptions
@inject IStringLocalizer<AbpUiResource> UiLocalizer
<CascadingAuthenticationState>
<Router AppAssembly="RouterOptions.Value.AppAssembly"
AdditionalAssemblies="RouterOptions.Value.AdditionalAssemblies">
<Found Context="routeData">
<AuthorizeRouteView RouteData="@routeData" DefaultLayout="@typeof(DefaultLayout)">
<NotAuthorized>
@if (context.User?.Identity?.IsAuthenticated == false)
{
<RedirectToLogin/>
}
else
{
<p>You are not authorized to access this resource.</p
}
</NotAuthorized>
</AuthorizeRouteView>
</Found>
<NotFound>
<LayoutView Layout="@typeof(DefaultLayout)">
<ErrorView
Title="@UiLocalizer["404Message"]"
HttpStatusCode="404"
Message="@UiLocalizer["404MessageDetail"]"/>
</LayoutView>
</NotFound>
</Router>
</CascadingAuthenticationState>