I have found out the problem. Is that out parameter not supported in HttpController?
[HttpGet]
[Route("try-open-id")]
public bool TryGetOpenId(Guid? userId, out string openId)
{
return this._userWeChatIdAppService.TryGetOpenId(userId, out openId);
}
private void ConfigureAuthentication(ServiceConfigurationContext context, IConfiguration configuration) { context.Services.AddAuthentication(options => { options.DefaultScheme = "Cookies"; options.DefaultChallengeScheme = "oidc"; }) .AddCookie("Cookies", options => { options.ExpireTimeSpan = TimeSpan.FromDays(365); }) .AddAbpOpenIdConnect("oidc", options => { options.Authority = configuration["AuthServer:Authority"]; options.RequireHttpsMetadata = Convert.ToBoolean(configuration["AuthServer:RequireHttpsMetadata"]);; options.ResponseType = OpenIdConnectResponseType.CodeIdToken; options.ClientId = configuration["AuthServer:ClientId"]; options.ClientSecret = configuration["AuthServer:ClientSecret"]; options.SaveTokens = true; options.GetClaimsFromUserInfoEndpoint = true; options.Scope.Add("role"); options.Scope.Add("email"); options.Scope.Add("phone"); options.Scope.Add("Brain"); }); }
A TIRED blazor server side application。 I think it is caused by some configuration such as CORS to call API?
<strong>@L["Roles"]</strong>: @CurrentUser.Roles.JoinAsString(", ")
Waiting for you good news!
Oh, I add above global features. Then I rebuild the solutions. Run ef migrations add again. still got nothing.
[DependsOn(typeof(CmsKitProDomainSharedModule))]
public class Id5DomainSharedModule : AbpModule
{
public override void PreConfigureServices(ServiceConfigurationContext context)
{
Id5GlobalFeatureConfigurator.Configure();
Id5ModuleExtensionConfigurator.Configure();
}
public override void ConfigureServices(ServiceConfigurationContext context)
{
Configure<AbpVirtualFileSystemOptions>(options =>
{
options.FileSets.AddEmbedded<Id5DomainSharedModule>();
});
Configure<AbpLocalizationOptions>(options =>
{
options.Resources
.Add<Id5Resource>("en")
.AddBaseTypes(typeof(AbpValidationResource))
.AddVirtualJson("/Localization/Id5");
options.DefaultResourceType = typeof(Id5Resource);
});
Configure<AbpExceptionLocalizationOptions>(options =>
{
options.MapCodeNamespace("Id5", typeof(Id5Resource));
});
GlobalFeatureManager.Instance.Modules.CmsKit(cmsKit =>
{
cmsKit.EnableAll();
});
GlobalFeatureManager.Instance.Modules.CmsKitPro(cmsKitPro =>
{
cmsKitPro.EnableAll();
});
}
public partial class AddTables_CmsKitPro_Enabled : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
}
protected override void Down(MigrationBuilder migrationBuilder)
{
}
}
Yes, I call InsertAsync in try catch.
I must InsertAsnyc first, then continue with throw exception.
How to do?
After I upgrade to the 5.1.3. It is OK, now.
I found many result articles by search Google and Baidu. And I tried out them. But I failed.
Now, you resolved my question.
Thank you.
Maybe you can add above content to UserGuide.