Hi,
Okay, I will check it out.
Hi
What version are you using? can you provide steps to reproduce? thanks
Hi,
You can use the following methods to quickly fix the problem:
public class MyRemoteStreamContentOutputFormatter : OutputFormatter
{
public MyRemoteStreamContentOutputFormatter()
{
SupportedMediaTypes.Add(MediaTypeHeaderValue.Parse("*/*"));
}
protected override bool CanWriteType(Type type)
{
return typeof(IRemoteStreamContent).IsAssignableFrom(type);
}
public override async Task WriteResponseBodyAsync(OutputFormatterWriteContext context)
{
var remoteStream = (IRemoteStreamContent)context.Object;
using (var stream = remoteStream.GetStream())
{
if (stream.CanSeek)
{
stream.Position = 0;
}
await stream.CopyToAsync(context.HttpContext.Response.Body);
}
}
}
Configure<MvcOptions>(options =>
{
options.OutputFormatters.RemoveType<RemoteStreamContentOutputFormatter>();
options.OutputFormatters.Insert(0, new MyRemoteStreamContentOutputFormatter());
});
So if I understand correctly, to handle locally Roles and Permissions for external users (our SSO), we need a local authentication server, to handle our external provider (our SSO), and create users as "external user" in our system.
Yes you need, like IdentityServer
Or could I add a reference to AbpAccountPublicWebModule in the HttpApi tier, and handle it there ?
No problem, HttpApi.Host can also be an authorization server
Hi,
You should not reference AbpAccountPublicWebModule
to web project, because it requires you to use a database, you should be redirected to your authorization server
Hi,
This is actually a DI problem, you can try :
[DependsOn(
typeof(XXXXXHttpApiModule),
typeof(XXXXXHttpApiClientModule),
typeof(AbpAspNetCoreAuthenticationOpenIdConnectModule),
typeof(AbpAspNetCoreMvcClientModule),
typeof(AbpAutofacModule),
typeof(AbpCachingStackExchangeRedisModule),
typeof(AbpFeatureManagementWebModule),
typeof(AbpAccountAdminWebModule),
typeof(AbpHttpClientIdentityModelWebModule),
typeof(AbpIdentityWebModule),
typeof(AbpAuditLoggingWebModule),
typeof(LeptonThemeManagementWebModule),
typeof(AbpAspNetCoreMvcUiLeptonThemeModule),
typeof(LanguageManagementWebModule),
typeof(TextTemplateManagementWebModule),
typeof(AbpSwashbuckleModule),
typeof(AbpAspNetCoreSerilogModule),
typeof(AbpAccountPublicWebModule)
)]
///these are module developped by us
[DependsOn(typeof(XXXXWebModule))]
[DependsOn(typeof(XXXWebModule))]
[DependsOn(typeof(XXXXWebModule))]
[DependsOn(typeof(XXXWebModule))]
[DependsOn(typeof(XXXXWebModule))]
[DependsOn(typeof(XXXXEntityFrameworkCoreModule))] // this line.
public class XXXXWebModule : AbpModule
Hi,
Check the migration guides: https://docs.abp.io/en/commercial/latest/migration-guides/v4_3
Hi,
This is a known issue and we have fixed, See https://github.com/abpframework/abp/pull/8253
You can upgrade to ABP 4.3