Activities of "niall"

  • ABP Framework version: v8.2.2
  • UI Type: Angular / MVC / Blazor WASM / Blazor Server
  • Database System: EF Core (SQL Server, Oracle, MySQL, PostgreSQL, etc..) / MongoDB
  • Tiered (for MVC) or Auth Server Separated (for Angular): yes/no
  • Exception message and full stack trace:
  • Steps to reproduce the issue:

There are a App.SelfUrl attribute at appsettings.json, This attribute does not affect the listening address of the service, so what is the function of this attribute?

Thanks ~

Can I comment the ConfigureHealthChecks(context); to close the health check? Will there be a negative impact on the system?

    public override void ConfigureServices(ServiceConfigurationContext context)
    {
        var configuration = context.Services.GetConfiguration();
        var hostingEnvironment = context.Services.GetHostingEnvironment();

        if (!configuration.GetValue<bool>("App:DisablePII"))
        {
            Microsoft.IdentityModel.Logging.IdentityModelEventSource.ShowPII = true;
        }

        ConfigureUrls(configuration);
        ConfigureConventionalControllers();
        ConfigureAuthentication(context, configuration);
        ConfigureSwagger(context, configuration);
        ConfigureCache(configuration);
        ConfigureVirtualFileSystem(context);
        ConfigureDataProtection(context, configuration, hostingEnvironment);
        ConfigureDistributedLocking(context, configuration);
        ConfigureCors(context, configuration);
        ConfigureExternalProviders(context);
        
        //ConfigureHealthChecks(context);

        Configure<PermissionManagementOptions>(options =>
        {
            options.IsDynamicPermissionStoreEnabled = true;
        });
    }

Thanks~

Thanks ~~

  • ABP Framework version: v8.2.2
  • UI Type: MVC
  • Database System: EF Core (MySQL)
  • Tiered (for MVC) or Auth Server Separated (for Angular): yes
  • Exception message and full stack trace:
  • Steps to reproduce the issue:

I created a app template project, build the HttpApi.Host to docker container.

I run the container. get a exception:

[07:11:21 INF] Saving external localizations...
[07:11:21 INF] Initialized all ABP modules.
[07:11:21 INF] Initializing UI Database
[07:11:21 INF] Saving healthchecks configuration to database
[07:11:21 INF] Now listening on: http://[::]:8080
[07:11:21 INF] Start processing HTTP request GET http://[::]:8080/health-status
[07:11:21 INF] Sending HTTP request GET http://[::]:8080/health-status
[07:11:21 INF] Application started. Press Ctrl+C to shut down.
[07:11:21 ERR] GetHealthReport threw an exception when trying to get report from /health-status configured with name BaaSo Health Status.
System.Net.Http.HttpRequestException: IPv4 address 0.0.0.0 and IPv6 address ::0 are unspecified addresses that cannot be used as a target address. (Parameter 'hostName') ([::]:8080)
 ---> System.ArgumentException: IPv4 address 0.0.0.0 and IPv6 address ::0 are unspecified addresses that cannot be used as a target address. (Parameter 'hostName')
   at System.Net.Dns.GetHostEntryOrAddressesCoreAsync(String hostName, Boolean justReturnParsedIp, Boolean throwOnIIPAny, Boolean justAddresses, AddressFamily family, CancellationToken cancellationToken)
   at System.Net.Dns.GetHostAddressesAsync(String hostNameOrAddress, AddressFamily family, CancellationToken cancellationToken)
   at System.Net.Sockets.SocketAsyncEventArgs.DnsConnectAsync(DnsEndPoint endPoint, SocketType socketType, ProtocolType protocolType)
   at System.Net.Sockets.Socket.ConnectAsync(SocketAsyncEventArgs e, Boolean userSocket, Boolean saeaCancelable)
   at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.ConnectAsync(Socket socket)
   at System.Net.Sockets.Socket.ConnectAsync(EndPoint remoteEP, CancellationToken cancellationToken)
   at System.Net.Http.HttpConnectionPool.ConnectToTcpHostAsync(String host, Int32 port, HttpRequestMessage initialRequest, Boolean async, CancellationToken cancellationToken)
   --- End of inner exception stack trace ---
   at System.Net.Http.HttpConnectionPool.ConnectToTcpHostAsync(String host, Int32 port, HttpRequestMessage initialRequest, Boolean async, CancellationToken cancellationToken)
   at System.Net.Http.HttpConnectionPool.ConnectAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
   at System.Net.Http.HttpConnectionPool.CreateHttp11ConnectionAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
   at System.Net.Http.HttpConnectionPool.AddHttp11ConnectionAsync(QueueItem queueItem)
   at System.Threading.Tasks.TaskCompletionSourceWithCancellation`1.WaitWithCancellationAsync(CancellationToken cancellationToken)
   at System.Net.Http.HttpConnectionPool.SendWithVersionDetectionAndRetryAsync(HttpRequestMessage request, Boolean async, Boolean doRequestAuth, CancellationToken cancellationToken)
   at System.Net.Http.RedirectHandler.SendAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
   at Microsoft.Extensions.Http.Logging.LoggingHttpMessageHandler.&lt;SendCoreAsync&gt;g__Core|5_0(HttpRequestMessage request, Boolean useAsync, CancellationToken cancellationToken)
   at Microsoft.Extensions.Http.Logging.LoggingScopeHttpMessageHandler.&lt;SendCoreAsync&gt;g__Core|5_0(HttpRequestMessage request, Boolean useAsync, CancellationToken cancellationToken)
   at System.Net.Http.HttpClient.&lt;SendAsync&gt;g__Core|83_0(HttpRequestMessage request, HttpCompletionOption completionOption, CancellationTokenSource cts, Boolean disposeCts, CancellationTokenSource pendingRequestsCts, CancellationToken originalCancellationToken)
   at HealthChecks.UI.Core.HostedService.HealthCheckReportCollector.GetHealthReportAsync(HealthCheckConfiguration configuration) in /_/src/HealthChecks.UI/Core/HostedService/HealthCheckReportCollector.cs:line 142

this is my appsettings.json:

{
    "App": {
        "SelfUrl": "http://192.168.11.121:8001",
        "MVCPublicUrl": "https://localhost:44303",
        "CorsOrigins": "://*.xxxx.cloud",
        "DisablePII": false,
        "HealthCheckUrl": "/health-status"
    },
    "ConnectionStrings": {
        "Default": "Server=172.27.21.1;Port=3306;Database=BaaSo;Uid=root;Pwd=mysql@XTC;"
    },
    "Redis": {
        "Configuration": "172.27.11.1"
    },
    "AuthServer": {
        "Authority": "http://192.168.11.121:8000",
        "RequireHttpsMetadata": false,
        "MetaAddress": "http://192.168.11.121:8000",
        "SwaggerClientId": "BaaSo_Swagger"
    },
    "StringEncryption": {
        "DefaultPassPhrase": "LbEc3rlM03dGiUvJ"
    },
    "BusinessUnits": {
        "Path": "/baaso/businessunits"
    }
}

this is my docker-compose:

 my.api:
    image: xtc/my.api:0.8.0
    container_name: my_platform_api
    restart: always
    ports:
      - 8001:8080
    networks:
      baaso:
        ipv4_address: 172.27.120.1

Check the docs before asking a question: https://abp.io/docs/latest Check the samples to see the basic tasks: https://abp.io/docs/latest/samples The exact solution to your question may have been answered before, and please first use the search on the homepage. Provide us with the following info: 🧐 Hint: If you are using the ABP Studio, you can see all the information about your solution from the configuration window, which opens when you right-click on the solution and click on the Solution Configuration button.

  • ABP Framework version: v8.2.2
  • UI Type: MVC
  • Database System: EF Core (MySQL etc..)
  • Tiered (for MVC) or Auth Server Separated (for Angular): yes
  • Exception message and full stack trace:
  • Steps to reproduce the issue:

How to change the background of this login page? I use the leptonX.

I know the best way is reference modules in application project and migrations all database. This is in line with DDD's architectural design. But my platform needs loads modules as plugin, so i must migrate the database in module. i modify the module template, and resolved most issue, now it works fine.

I know shouldn't add DbContextFactory and migrations for the EntityFrameworkCoreModule, but there is no better option at the moment.I just want to know some technical details to redesign later.

Get down to business, Is AbpDbContextOptions a singleton for the entire life of the runtime?

Thanks , I understand it.

But I would like to know some details.

Base the EntityFrameworkCoreModule of module template, add DbContextFactory to configure the DBMS. but this class is only valid for EntityFrameworkCore tool?

Real database provided by App at runtime? So if MyApp use SQLServer, but MyModule migrated by MySQL, will throw exception?

Is there a way to let MyModule will decide which database provider will be used?

I notice the the EntityFrameworkCoreModule of MyApp can use options.UseMySQL(); to change the DBMS.

public class MyAppEntityFrameworkCoreModule : AbpModule
{
    public override void PreConfigureServices(ServiceConfigurationContext context)
    {
        BaaSoEfCoreEntityExtensionMappings.Configure();
    }

    public override void ConfigureServices(ServiceConfigurationContext context)
    {
        context.Services.AddAbpDbContext<BaaSoDbContext>(options =>
        {
            options.AddDefaultRepositories(includeAllEntities: true);
        });

        context.Services.AddAbpDbContext<BaaSoTenantDbContext>(options =>
        {
            options.AddDefaultRepositories(includeAllEntities: true);
        });

        Configure<AbpDbContextOptions>(options =>
        {
                /* The main point to change your DBMS.
                 * See also BaaSoDbContextFactoryBase for EF Core tooling. */
            options.UseMySQL();
        });

    }
}
Showing 11 to 20 of 78 entries
Made with ❤️ on ABP v9.0.0-preview Updated on September 19, 2024, 10:13