Learn More, Pay Less!
Limited Time Offer!

Activities of "liangshiwei"

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

Hi,

This actually not related to ABP, you can check this: https://docs.microsoft.com/en-us/aspnet/core/security/docker-compose-https?view=aspnetcore-5.0

I wanted to let the user change it, specially in case the tenant with a given domain do not exists

Of course the user can change it when given domain do not exists. ABP will call the tenant resolver according to the priority until the resolution is successful.

Can not change priority or anything?

Yes you can :


Configure<AbpTenantResolveOptions>(option =>
{
    option.TenantResolvers.Insert(1, new CookieTenantResolveContributor());
});

Hi,

Because the domain resolver has a higher priority than the cookie resolver.

Hi,

Seems it work for you. I will close the ticket, please open again if you still have problem.

Showing 5621 to 5630 of 6574 entries
Made with ❤️ on ABP v9.2.0-preview. Updated on February 17, 2025, 05:40