Activities of "berkansasmaz"

Hello,

I tried what you want to do in my own project and it worked fine.

Here are my steps: 1-) I create a new file named test.css in wwwroot

2-) I change the MyProjectNameBundleContributor as below.

    public class Test123BundleContributor : IBundleContributor
    {
        public void AddScripts(BundleContext context)
        {
            
        }

        public void AddStyles(BundleContext context)
        {
            context.Add("main.css");
            context.BundleDefinitions.ReplaceOne(x => x.Source == "_content/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/libs/bootstrap/css/bootstrap.min.css", 
                new BundleDefinition
                {
                    Source = "test.css"
                });
        }
    }

As you can see from the code, I removed bootstrap.min.css and added test.css instead.

You can access other sources here.

3-) Run the abp bundle -f command in the Blazor project 4-) Check the global.css in wwwroot

5-) Run the application.



Note: I understand that you have an urgency and this is perfectly normal, but you are not the only one we need to take care of so I think you will appreciate short-term (e.g. 1 day) delayed responses. Also, it would be much better if you provide a minimal reproducible example for this kind of urgent business.

Why is a minimally reproducible example necessary?

For example, when you were describing the first problem, you explained it as follows.

I have run abp bundle command so it's showing script and styles bundled and I can see changes in my index.html file as well but If I run site so in browser no changes are done like it's not reducing js or css calls.

That sounds pretty self-explanatory, I can repeat that.

In your next reply, you replied as follows.

I checked my development.json file as well so it 's empty also If I try to add my custom css or js files in bundlecontributor.cs class and removing same js or css from index.html page and run abp bundle so it's not updating global.js or global.css files.

That sounds pretty self-explanatory, also. However, now you say you replace a resource.

So, both can be repeated for themselves, but there is difference between the two definitions. What I understood when I read the first definition is different from what I understood when I read the second definition. (Maybe I got it wrong, but it doesn't matter who misunderstood. The important thing is to solve the problem.)

As a result, while trying to reproduce the problem, I interpret and answer according to my own understanding. I make an effort to understand the problem, but nevertheless, if I misunderstood, I am not able to give an immediate response to your urgent problem. This is why a minimally reproducible example is vital.

Run below commands in EzpandCC.EntityFrameworkCore.DbMigrations/

  1. dotnet ef migrations add "Initial" --context EzpandCCMigrationsDbContext

  2. dotnet ef migrations add "Initial" --context EzpandCCSecondDbContext

These two commands need to be run sequentially, not together.

Additional Information

If you changed the name of the second DbContext you created, if EzpandCCSecondDbContext is different from this name, it should change accordingly in the command.

For example: My second DB context name is MyNewDbContext and so I have to write the following code.

dotnet ef migrations add "Initial" --context MyNewDbContext

Hello,

First of all, I assume that your appsettings.json file under wwwroot is as follows. I also think Bundle:Mode is not override by appsettings.development.json or otherwise.



After all this, I can say that I couldn't reproduce the problem.

global.css?_v=XXXXX

global.js?_v=XXXXX

Hello, I have explained how to do this step by step below. You can do it this way too. If you have any questions, please don't hesitate to ask.


  • Create EzpandCCSecondDbContext.cs in EzpandCC.EntityFrameworkCore.DbMigrations/EntityFrameworkCore/

  • Create EzpandCCSecondDbContextFactory.cs in EzpandCC.EntityFrameworkCore.DbMigrations/EntityFrameworkCore/

  • Remove below line from EzpandCCMigrationsDbContext in EzpandCC.EntityFrameworkCore.DbMigrations/EntityFrameworkCore/

builder.ConfigureAuditLogging();

  • Add below lines to MigrateAsync method in EntityFrameworkCoreEzpandCCDbSchemaMigrator class in EzpandCC.EntityFrameworkCore.DbMigrations/EntityFrameworkCore/
await _serviceProvider
                .GetRequiredService<EzpandCCSecondDbContext>()
                .Database
                .MigrateAsync();
  • Add below line to ConfigureServices metod in EzpandCCEntityFrameworkCoreDbMigrationsModule class in EzpandCC.EntityFrameworkCore.DbMigrations/EntityFrameworkCore/

context.Services.AddAbpDbContext<EzpandCCSecondDbContext>();

  • Add the following connection string under Default for all appsettings.json.

"AbpAuditLogging": "Server=(LocalDb)\\MSSQLLocalDB;Database=EzpandCC;Trusted_Connection=True"

  • Run below commands in EzpandCC.EntityFrameworkCore.DbMigrations/

dotnet ef migrations add "Initial" --context EzpandCCMigrationsDbContext dotnet ef migrations add "Initial" --context EzpandCCSecondDbContext

  • Finally, run the EzpandCC.DbMigrator project.

Hi, I tested the situation. As you say yes, and this is actually expected.

Since it is a saas service, even if you do what you want to do, you will have to open the service to outside at the end of the day. Furthermore, to do what you want to do, you will need to pass the token as a parameter to the saas service or prepare a login UI.

For more information, you can check here: https://medium.com/we-code/hangfire-dashboard-and-jwt-authentication-751aae3bcd4a

My suggestion is not to add hangfire to saas service or other services. You can create a separate host application for this (similar to auth-server), then set the necessary dependencies and access hangfire from there.

The question seems to have been closed by the bot, but if the related problem is still not fixed, please feel free to open it.

Thank you for the detailed explanation, I will test it as soon as possible.

Any chance of posting a minimally reproducible example so I can reproduce the problem faster?

I suspect that you are not logged in because the error code is 401 (Unauthorized), but I will test the situation and reply to you again.

I'm waiting for your response then. Also if the question is closed by the bot you don't have to worry, you can reopen it 😊

Showing 201 to 210 of 331 entries
Made with ❤️ on ABP v9.0.0-preview Updated on September 20, 2024, 08:30