Q : 未经授权的申请方法不会返回**401**
,跳转到Login
页面 [10.02.01](https://www.yuque.com/wwwk/dotnetcore/gysbxq)
A :https://github.com/abpframework/abp/issues/5235
Q:创建IdentityUser
是指定了Claim
,使用Cookies
返回了,但是IDS
登录方式没有返回。
A:在module
中添加如下代码,指定XXXClamName
源码
Configure<AbpClaimsServiceOptions>(options =>
{
options.RequestedClaims.Add(XXXClamName);
});
Q:返回文件的时候,需要使用**IActionResult**
,但是ABP抛出异常的时候不能包含此类型,造成异常直接指向错误页。
A:使用IRemoteStreamContent
返回文件。
Q:迁移PostgreSQL数据库失败
Cannot write DateTime with Kind=Local to PostgreSQL type 'timestamp with time zone', only UTC is supported. Note that it's not possible to mix DateTimes with different Kinds in an array/range. See the Npgsql.EnableLegacyTimestampBehavior AppContext switch to enable legacy behavior.
at Npgsql.Internal.TypeHandlers.DateTimeHandlers.TimestampTzHandler.ValidateAndGetLength(DateTime value, NpgsqlParameter parameter)
A:在Program
添加AppContext.SetSwitch("Npgsql.EnableLegacyTimestampBehavior", true);