Activities of "liangshiwei"

Hi,

There are the steps:

  • Remove all about Telerik, because I don't have the license
  • Run the DbMigrator to create a database.
  • Use the dotnet publish command to publish the Blazor project and copy the authserver.pfx to the publish folder
  • Create an IIS website and make the IISUSER has read and write permissions to the publish folder

Hi,

The link login API URL is /account/LinkLogin?SourceLinkUserId=xxx&SourceLinkTenantId=xxx........

Parameters:

  • SourceLinkUserId: Should be the current user Id
  • SourceLinkTenantId: Should be the current tenant Id
  • SourceLinkToken
  • TargetLinkUserId: The user Id you want to switch
  • TargetLinkTenantId: The tenant Id you want to switch

You can use the GenerateLinkTokenAsync method of IIdentityLinkUserAppservice to get the SourceLinkToken

Hi,

We will fix it in the patch version and your ticket refunded

You can try this:

MyDynamicWidgetMarkdown

@using Volo.Abp.DependencyInjection
@using Volo.CmsKit.Pro.Admin.Blazor.Pages.CmsKit
@inherits Volo.CmsKit.Pro.Admin.Blazor.Pages.CmsKit.DynamicWidgetMarkdown
@attribute [ExposeServices(typeof(DynamicWidgetMarkdown))]
@attribute [Dependency(ReplaceServices = true)]

<Markdown
    @Value="@Value"
    ValueChanged="@OnValueChanged"
    ImageUploadChanged="@OnImageUploadChangedAsync"
    ImageUploadEnded="@OnImageUploadEndedAsync"
    AutoDownloadFontAwesome="false"
    CustomButtonClicked="@OnCustomButtonClicked"
    @ref="@MarkdownRef">
    <Toolbar>
        @{
            foreach (var markdownToolbarButton in MarkdownToolbarButtons)
            {
                <MarkdownToolbarButton Action="@markdownToolbarButton"/>
            }
            <MarkdownToolbarButton Separator Name="W" Icon="@("none")" Title="Add Widget" Text="W" ></MarkdownToolbarButton>
        }
    </Toolbar>
</Markdown>


<Modal @ref="@AddWidgetModalRef" Closing="@ClosingAddWidgetModal" RenderMode="ModalRenderMode.LazyReload">
    <ModalContent Size="ModalSize.Large" Centered="true">
        <Form>
            <ModalHeader>
                <ModalTitle>@L["AddWidget"]</ModalTitle>
                <CloseButton Clicked="CloseAddWidgetModalAsync"/>
            </ModalHeader>
            <ModalBody>
                @if (Widgets.Any())
                {
                    <Field>
                        <FieldLabel>@L["Widget"]</FieldLabel>
                        <FieldBody>
                            <Select @bind-SelectedValue="@ViewModel.Widget">
                                <SelectItem></SelectItem>
                                @foreach (var item in Widgets)
                                {
                                    <SelectItem Value="@item.Key">@item.Value</SelectItem>
                                }
                            </Select>
                        </FieldBody>
                    </Field>

                    foreach (var item in ViewModel.Details)
                    {
                        if (item.EditorComponentName is not null)
                        {
                            if (ViewModel.Widget == item.Name)
                            {
                                <div id="editor-@item.Name">
                                    <form data-check-form-on-close="false">
                                        <DynamicComponent Type="Options.Value.FindParameterComponentType(item.EditorComponentName)"></DynamicComponent>
                                    </form>
                                </div>
                            }
                        }
                    }
                }
                else
                {
                    <p>@L["PleaseConfigureWidgets"].Value</p>
                }
            </ModalBody>
            <ModalFooter>
                @if (Widgets.Any())
                {
                    <Button Color="Color.Primary" Clicked="AddWidgetAsync">@L["Add"]</Button>
                }
            </ModalFooter>
        </Form>
    </ModalContent>
</Modal>

Hi,

Because ABP uses controller as a service: https://andrewlock.net/controller-activation-and-dependency-injection-in-asp-net-core-mvc/

But you can't add service after the application start.

You can try this.

The MyControllerActivator will try to create from DI and manually create an instance if it does not exist.

public sealed class MyTypeActivatorCache : ISingletonDependency
{

#nullable disable
    private readonly Func<Type, ObjectFactory> _createFactory = (Func<Type, ObjectFactory>) (type => ActivatorUtilities.CreateFactory(type, Type.EmptyTypes));
    private readonly ConcurrentDictionary<Type, ObjectFactory> _typeActivatorCache = new ConcurrentDictionary<Type, ObjectFactory>();
    
    public TInstance CreateInstance<TInstance>(
        IServiceProvider serviceProvider,
        Type implementationType)
    {
        if (serviceProvider == null)
            throw new ArgumentNullException(nameof (serviceProvider));
        if (implementationType == (Type) null)
            throw new ArgumentNullException(nameof (implementationType));
        return (TInstance) this._typeActivatorCache.GetOrAdd(implementationType, this._createFactory)(serviceProvider, (object[]) null);
    }
    
    public bool IsCreated(Type implementationType)
    {
        return this._typeActivatorCache.ContainsKey(implementationType);
    }
}

public class MyControllerActivator : IControllerActivator
{
    private readonly ServiceBasedControllerActivator _serviceBasedControllerActivator;
    private readonly MyTypeActivatorCache _typeActivatorCache;
    public MyControllerActivator(ServiceBasedControllerActivator serviceBasedControllerActivator,
        MyTypeActivatorCache typeActivatorCache)
    {
        _serviceBasedControllerActivator = serviceBasedControllerActivator;
        _typeActivatorCache = typeActivatorCache;
    }

    public object Create(ControllerContext context)
    {
        try
        {
            return _serviceBasedControllerActivator.Create(context);
        }
        catch (Exception e)
        {
            if (context == null)
            {
                throw new ArgumentNullException(nameof(context));
            }
        
            var controllerTypeInfo = context.ActionDescriptor.ControllerTypeInfo;

            if (controllerTypeInfo == null)
            {
                throw new ArgumentException(nameof(context.ActionDescriptor.ControllerTypeInfo));
            }

            var serviceProvider = context.HttpContext.RequestServices;
            return _typeActivatorCache.CreateInstance<object>(serviceProvider, controllerTypeInfo.AsType());
        }
    }

    public void Release(ControllerContext context, object controller)
    {
        if (context == null)
        {
            throw new ArgumentNullException(nameof(context));
        }

        if (controller == null)
        {
            throw new ArgumentNullException(nameof(controller));
        }

        if (_typeActivatorCache.IsCreated(controller.GetType()))
        {
            if (controller is IDisposable disposable)
            {
                disposable.Dispose();
            }
        }
    }
}


context.Services.AddTransient<ServiceBasedControllerActivator>();
context.Services.Replace(ServiceDescriptor.Transient<IControllerActivator, MyControllerActivator>());

Hi,

Which authserver provider are you using? IdentityServer or Openiddict

Hi,

I still couldn't find where the data is persisted (from which section of the code). I was checking ILocalizationResourceContributor implementations inside the source code, can not see any data persistency. Can you post the class or line where abp store the localization resources to db?

The language management module create the IExternalLocalizationSaver interface and uses it internally to save resources to the database.

You can find it in the .domain project of the language management module:

I think i have found the solution but I couldn't understand why it behaves like it.

Yes, that's the problem, When you clear the database, you also need to clear the redis cache.

Do you intend to fix the display bug (see my screencast)? This will probably affect everyone and not just me.... Because then I wait for your update and use my workaround until then.

This is not a bug, but it does bring a bad user experience, I will create an internal issue and consider enhancing it in future versions.

Hi,

So I was wondering from where is this data seeded? Cause definitely it is not been stored in my database.

Data is saved to the database on the application startup, did you run the AuthServer project?

Can you share a project that can reproduce the problem with me if you already did all things but still problem? shiwei.liang@volosoft.com I will check it out.

Hi,

What is the purpose of the script "leptonx-blazor-compatibility.js" that you say I can just remove it?

Back to your original question:

You are trying to load the style manually, but you find that the style will be repeated.

As I said: We use leptonx-blazor-compatibility.js internally to load styles dynamically. you can create a BundleContributor to remove it to avoid duplicate loading of styles.

After this change, I guess no stylesheets are loaded at all. In any case, it does not work like this.

Yes, some styles won't load, so you need to add them manually like you did before:

Hi,

Can you share a minimal reproducible project? shiwei.liang@volosoft.com I will check it. thanks.

Showing 4111 to 4120 of 6693 entries
Boost Your Development
ABP Live Training
Packages
See Trainings
Mastering ABP Framework Book
The Official Guide
Mastering
ABP Framework
Learn More
Mastering ABP Framework Book
Made with ❤️ on ABP v10.1.0-preview. Updated on October 30, 2025, 06:33