Activities of "EngincanV"

I scraped the information together from issues from others. It works, but I don't understand everything yet (e.g. generating the SigningKey & EncryptionKey)

Hi, can you see this comment and apply it in your module class.

Hi, this problem is related to the certificatation. You need to set the AddDevelopmentEncryptionAndSigningCertificate as false and also set encryption and signing certificates for your application.


So, open your module class and add the below code:

public override void PreConfigureServices(ServiceConfigurationContext context)
{
     var hostingEnvironment = context.Services.GetHostingEnvironment();

     if (!hostingEnvironment.IsDevelopment())
     {
         PreConfigure<AbpOpenIddictAspNetCoreOptions>(options =>
         {
             options.AddDevelopmentEncryptionAndSigningCertificate = false;
         });

         PreConfigure<OpenIddictServerBuilder>(builder =>
         {
             // In production, it is recommended to use two RSA certificates, one for encryption, one for signing.
             builder.AddEncryptionCertificate(GetSigningCertificate(hostingEnvironment, context.Services.GetConfiguration()));
             builder.AddSigningCertificate(GetSigningCertificate(hostingEnvironment, context.Services.GetConfiguration()));
         });
     }
}

        private X509Certificate2 GetSigningCertificate(IWebHostEnvironment hostingEnv, IConfiguration configuration)
        {
            var fileName = configuration["MyAppCertificate:X590:FileName"]; //*.pfx 
            var passPhrase = configuration["MyAppCertificate:X590:PassPhrase"]; // pass phrase (XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX)
            var file = Path.Combine(hostingEnv.ContentRootPath, fileName);

            if (!File.Exists(file))
            {
                throw new FileNotFoundException($"Signing Certificate couldn't found: {file}");
            }

            return new X509Certificate2(file, passPhrase);
        }

The self-signed certificates were generated based on the documentation available on https://documentation.openiddict.com/configuration/encryption-and-signing-credentials.html.

I guess that normally there would not be a new version available to update to without all the needed packages also being available and released?

Sometimes there might problems with releases of packages and therefore some services could not be used for a matter of time. But normally as you said updates should not be available until all packages are released.

I'm refunding your ticket and closing the question since it's fixed.

Best regards.

I went through the documentation you suggested but it requires Entity Framework Core .cs file which I won't be having in template downloaded to setup from https://docs.abp.io/en/abp/latest/Apps/VoloDocs

VoloDocs is a self-contained application, which only can be run without modification of code (you can think it as a sample application. So, if you want to use the Docs Module of ABP Framework and change the database provider as PostgreSQL, you need to create a template with PostgreSQL as database provider and then add the Docs Module to your application:

1-) Creating a template with PostgreSQL as database provider :

abp new Acme.BookStore --database-management-system PostgreSQL

2-) Add Docs Module into your application:

abp add-module Volo.Docs

Then, you can use the Docs Module with PostgreSQL. But as i said, it's not possible with self-contained VoloDocs application.

Hi, please see the Switch to EF Core PostgreSQL Provider documentation.

Hi, you probably tried to update ABP Suite without all related packages being released. Can you try again?

What is the ABP Suite to be used with RC4?

You can update the ABP Suite to RC.4. Your CLI version and ABP Suite version should be the same.

Hi, you can override a razor component without needing to download all the source code of the module. See the Blazor UI: Customization / Overriding Components to see how to override a razor component.


Are there any plans by ABP to extend the LeptonThemeOptions that can be made configurable to include the MainSiderbar.razor component?

Currently, we don't have any plan regarding that. Because the developer can override any razor component easily by following the Blazor UI: Customization / Overriding Components documentation.

I see MVC has Application, Account, and Empty Layouts. Do we have those for blazor?

Hi, LeptonX Lite only has one layout named Application and LeptonX Theme has three layouts: Application, Side Menu and Top Menu.


You can create a custom layout by checking the Basic Theme layout, from here. And for set it as your layout configure the LeptonXThemeBlazorOptions option:

Configure<LeptonXThemeBlazorOptions>(options =>
{
    options.Layout = LeptonXBlazorLayouts.SideMenu;
    // Or your custom implemented layout:
    options.Layout = typeof(MyCustomLayoutComponent);
});

See https://docs.abp.io/en/commercial/latest/themes/lepton-x/commercial/blazor?UI=BlazorServer#leptonxthemeblazoroptions for more info.

Hi @abpfintranet-1, you can override the SetProfilePictureAsync method of the AccountAppService class and check whether the file size exceeds or not:

[Dependency(ReplaceServices = true)]
[ExposeServices(typeof(IAccountAppService), typeof(AccountAppService), typeof(MyAccountAppService))]
public class MyAccountAppService : AccountAppService
{
    [Authorize]
    public override async Task SetProfilePictureAsync(ProfilePictureInput input)
    {
        //check the file size and do not proceed if it's exceeded
        if(input.ImageContent.ContentLength > MaxFileSize)
        {
            return; //or throw exception
        }
         
        //file size not exceeded so, continue to set profile picture...
        
        await SettingManager.SetForUserAsync(CurrentUser.GetId(), AccountSettingNames.ProfilePictureSource, input.Type.ToString());

        var userIdText = CurrentUser.GetId().ToString();

        if (input.Type != ProfilePictureType.Image)
        {
            if (await AccountProfilePictureContainer.ExistsAsync(userIdText))
            {
                await AccountProfilePictureContainer.DeleteAsync(userIdText);
            }
        }
        else
        {
            if (input.ImageContent == null)
            {
                throw new NoImageProvidedException();
            }

            await AccountProfilePictureContainer.SaveAsync(userIdText, input.ImageContent.GetStream(), true);
        }
    }
 }

Hi @guven.uysall, if you want to apply entity configurations (table prefix, column, etc.) to all new generated entities, you can edit the templates from Suite.


Example: You can edit the Server.Entity.Partials.ConfigureEntity.txt template and add additional configurations for an entity.

See the documentation.


If you only want to keep changes for certain entities, you should handle it yourself.

Showing 391 to 400 of 724 entries
Made with ❤️ on ABP v9.1.0-preview. Updated on November 11, 2024, 11:11