abpframework / abp

Open-source web application framework for ASP.NET Core! Offers an opinionated architecture to build enterprise software solutions with best practices on top of the .NET. Provides the fundamental infrastructure, cross-cutting-concern implementations, startup templates, application modules, UI themes, tooling and documentation.
https://abp.io
GNU Lesser General Public License v3.0
12.89k stars 3.44k forks source link

Blazor-Server app run only in Development Environment #21077

Closed enny1170 closed 4 days ago

enny1170 commented 1 week ago

Is there an existing issue for this?

Description

Unable to run a Blazor-Server app without sett ASPNETCORE_ENVIRIONMENT to Development. Compiling for Debug or Release works fine. Try to run the compiled App for Commandline by typing dotnet xxx.Blazor.dll does nothing.

Reproduction Steps

create a new App with app-cli -ui blazor-server do install-libs by cli go to src/myapp.blazor call dotnet build go to bin/Debug/net8.0 folder call dotnet myapp.blazor.dll nothing happens call dotnet myapp.blazor.dll --environment Development the app will start with a error because of the virtual filesystem provider call dotnet myapp.blazor.dll --environment Staging nothing happens

Expected behavior

the app starts or give a meaningful message is something wrong

Actual behavior

it does nothing. returns to the command prompt. No Messages.

Regression?

this has worked in Version 8.0.1

Known Workarounds

No response

Version

8.3.1

User Interface

Blazor Server

Database Provider

EF Core (Default)

Tiered or separate authentication server

None (Default)

Operation System

macOS

Other information

I have try it also on Windows 11. same behavior.

maliming commented 1 week ago

hi

Check your logs.txt file.

enny1170 commented 1 week ago

No logs.txt is created except I use the –enviroment Development parameter I have done this steps

Go to xxx.blazor project directory Call dotnet build -c Release Call dotnet publish Jump to bin/Release/net8.0 subfolder Call dotnet xxx.blazor.dll

Nothing happens, no Logs Dir created, no logs.txt Jump to publish subdir Call dotnet xxx.blazor.dll

Nothing happens no Logs Dir, no logs.txt

Call dotnet xxx.blazor.dll –environment Development The app try to start, logs.txt created is attached

But the goal is to deploy the app in release mode. This is not possible.

Von: maliming @.> Datum: Mittwoch, 16. Oktober 2024 um 09:08 An: abpframework/abp @.> Cc: enny @.>, Author @.> Betreff: Re: [abpframework/abp] Blazor-Server app run only in Development Environment (Issue #21077)

hi

Check your logs.txt file.

— Reply to this email directly, view it on GitHubhttps://github.com/abpframework/abp/issues/21077#issuecomment-2415912693, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AEJWEUGMMI4N3XWRGY7LRJ3Z3YGHXAVCNFSM6AAAAABP5VHSTSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIMJVHEYTENRZGM. You are receiving this because you authored the thread.Message ID: @.***>

2024-10-16 11:30:30.275 +02:00 [INF] Loaded ABP modules: 2024-10-16 11:30:30.275 +02:00 [INF] - SMLicence.Blazor.SMLicenceBlazorModule 2024-10-16 11:30:30.275 +02:00 [INF] - SMLicence.SMLicenceApplicationModule 2024-10-16 11:30:30.275 +02:00 [INF] - SMLicence.SMLicenceDomainModule 2024-10-16 11:30:30.275 +02:00 [INF] - SMLicence.SMLicenceDomainSharedModule 2024-10-16 11:30:30.275 +02:00 [INF] - Volo.Abp.AuditLogging.AbpAuditLoggingDomainSharedModule 2024-10-16 11:30:30.275 +02:00 [INF] - Volo.Abp.Validation.AbpValidationModule 2024-10-16 11:30:30.275 +02:00 [INF] - Volo.Abp.Validation.AbpValidationAbstractionsModule 2024-10-16 11:30:30.275 +02:00 [INF] - Volo.Abp.Localization.AbpLocalizationModule 2024-10-16 11:30:30.275 +02:00 [INF] - Volo.Abp.VirtualFileSystem.AbpVirtualFileSystemModule 2024-10-16 11:30:30.275 +02:00 [INF] - Volo.Abp.Settings.AbpSettingsModule 2024-10-16 11:30:30.275 +02:00 [INF] - Volo.Abp.Localization.AbpLocalizationAbstractionsModule 2024-10-16 11:30:30.275 +02:00 [INF] - Volo.Abp.Security.AbpSecurityModule 2024-10-16 11:30:30.275 +02:00 [INF] - Volo.Abp.Data.AbpDataModule 2024-10-16 11:30:30.275 +02:00 [INF] - Volo.Abp.ObjectExtending.AbpObjectExtendingModule 2024-10-16 11:30:30.275 +02:00 [INF] - Volo.Abp.Uow.AbpUnitOfWorkModule 2024-10-16 11:30:30.275 +02:00 [INF] - Volo.Abp.EventBus.Abstractions.AbpEventBusAbstractionsModule 2024-10-16 11:30:30.275 +02:00 [INF] - Volo.Abp.Threading.AbpThreadingModule 2024-10-16 11:30:30.275 +02:00 [INF] - Volo.Abp.BackgroundJobs.AbpBackgroundJobsDomainSharedModule 2024-10-16 11:30:30.275 +02:00 [INF] - Volo.Abp.FeatureManagement.AbpFeatureManagementDomainSharedModule 2024-10-16 11:30:30.275 +02:00 [INF] - Volo.Abp.Json.SystemTextJson.AbpJsonSystemTextJsonModule 2024-10-16 11:30:30.275 +02:00 [INF] - Volo.Abp.Json.AbpJsonAbstractionsModule 2024-10-16 11:30:30.275 +02:00 [INF] - Volo.Abp.Timing.AbpTimingModule 2024-10-16 11:30:30.275 +02:00 [INF] - Volo.Abp.PermissionManagement.AbpPermissionManagementDomainSharedModule 2024-10-16 11:30:30.275 +02:00 [INF] - Volo.Abp.SettingManagement.AbpSettingManagementDomainSharedModule 2024-10-16 11:30:30.275 +02:00 [INF] - Volo.Abp.Features.AbpFeaturesModule 2024-10-16 11:30:30.275 +02:00 [INF] - Volo.Abp.MultiTenancy.AbpMultiTenancyModule 2024-10-16 11:30:30.275 +02:00 [INF] - Volo.Abp.MultiTenancy.AbpMultiTenancyAbstractionsModule 2024-10-16 11:30:30.275 +02:00 [INF] - Volo.Abp.Authorization.AbpAuthorizationAbstractionsModule 2024-10-16 11:30:30.275 +02:00 [INF] - Volo.Abp.Identity.AbpIdentityDomainSharedModule 2024-10-16 11:30:30.275 +02:00 [INF] - Volo.Abp.Users.AbpUsersDomainSharedModule 2024-10-16 11:30:30.275 +02:00 [INF] - Volo.Abp.OpenIddict.AbpOpenIddictDomainSharedModule 2024-10-16 11:30:30.275 +02:00 [INF] - Volo.Abp.TenantManagement.AbpTenantManagementDomainSharedModule 2024-10-16 11:30:30.275 +02:00 [INF] - Volo.Abp.BlobStoring.Database.BlobStoringDatabaseDomainSharedModule 2024-10-16 11:30:30.275 +02:00 [INF] - Volo.Abp.AuditLogging.AbpAuditLoggingDomainModule 2024-10-16 11:30:30.275 +02:00 [INF] - Volo.Abp.Auditing.AbpAuditingModule 2024-10-16 11:30:30.275 +02:00 [INF] - Volo.Abp.Json.AbpJsonModule 2024-10-16 11:30:30.275 +02:00 [INF] - Volo.Abp.Auditing.AbpAuditingContractsModule 2024-10-16 11:30:30.275 +02:00 [INF] - Volo.Abp.Domain.AbpDddDomainModule 2024-10-16 11:30:30.275 +02:00 [INF] - Volo.Abp.EventBus.AbpEventBusModule 2024-10-16 11:30:30.275 +02:00 [INF] - Volo.Abp.Guids.AbpGuidsModule 2024-10-16 11:30:30.275 +02:00 [INF] - Volo.Abp.BackgroundWorkers.AbpBackgroundWorkersModule 2024-10-16 11:30:30.275 +02:00 [INF] - Volo.Abp.DistributedLocking.AbpDistributedLockingAbstractionsModule 2024-10-16 11:30:30.275 +02:00 [INF] - Volo.Abp.ObjectMapping.AbpObjectMappingModule 2024-10-16 11:30:30.275 +02:00 [INF] - Volo.Abp.ExceptionHandling.AbpExceptionHandlingModule 2024-10-16 11:30:30.275 +02:00 [INF] - Volo.Abp.Specifications.AbpSpecificationsModule 2024-10-16 11:30:30.275 +02:00 [INF] - Volo.Abp.Caching.AbpCachingModule 2024-10-16 11:30:30.275 +02:00 [INF] - Volo.Abp.Serialization.AbpSerializationModule 2024-10-16 11:30:30.275 +02:00 [INF] - Volo.Abp.Domain.AbpDddDomainSharedModule 2024-10-16 11:30:30.276 +02:00 [INF] - Volo.Abp.BackgroundJobs.AbpBackgroundJobsDomainModule 2024-10-16 11:30:30.276 +02:00 [INF] - Volo.Abp.BackgroundJobs.AbpBackgroundJobsModule 2024-10-16 11:30:30.276 +02:00 [INF] - Volo.Abp.BackgroundJobs.AbpBackgroundJobsAbstractionsModule 2024-10-16 11:30:30.276 +02:00 [INF] - Volo.Abp.AutoMapper.AbpAutoMapperModule 2024-10-16 11:30:30.276 +02:00 [INF] - Volo.Abp.FeatureManagement.AbpFeatureManagementDomainModule 2024-10-16 11:30:30.276 +02:00 [INF] - Volo.Abp.PermissionManagement.Identity.AbpPermissionManagementDomainIdentityModule 2024-10-16 11:30:30.276 +02:00 [INF] - Volo.Abp.PermissionManagement.AbpPermissionManagementDomainModule 2024-10-16 11:30:30.276 +02:00 [INF] - Volo.Abp.Authorization.AbpAuthorizationModule 2024-10-16 11:30:30.276 +02:00 [INF] - Volo.Abp.Users.AbpUsersAbstractionModule 2024-10-16 11:30:30.276 +02:00 [INF] - Volo.Abp.PermissionManagement.OpenIddict.AbpPermissionManagementDomainOpenIddictModule 2024-10-16 11:30:30.276 +02:00 [INF] - Volo.Abp.SettingManagement.AbpSettingManagementDomainModule 2024-10-16 11:30:30.276 +02:00 [INF] - Volo.Abp.Emailing.AbpEmailingModule 2024-10-16 11:30:30.276 +02:00 [INF] - Volo.Abp.TextTemplating.AbpTextTemplatingModule 2024-10-16 11:30:30.276 +02:00 [INF] - Volo.Abp.TextTemplating.Scriban.AbpTextTemplatingScribanModule 2024-10-16 11:30:30.276 +02:00 [INF] - Volo.Abp.TextTemplating.AbpTextTemplatingCoreModule 2024-10-16 11:30:30.276 +02:00 [INF] - Volo.Abp.Identity.AbpIdentityDomainModule 2024-10-16 11:30:30.276 +02:00 [INF] - Volo.Abp.Users.AbpUsersDomainModule 2024-10-16 11:30:30.276 +02:00 [INF] - Volo.Abp.OpenIddict.AbpOpenIddictDomainModule 2024-10-16 11:30:30.276 +02:00 [INF] - Volo.Abp.TenantManagement.AbpTenantManagementDomainModule 2024-10-16 11:30:30.276 +02:00 [INF] - Volo.Abp.BlobStoring.Database.BlobStoringDatabaseDomainModule 2024-10-16 11:30:30.276 +02:00 [INF] - Volo.Abp.BlobStoring.AbpBlobStoringModule 2024-10-16 11:30:30.276 +02:00 [INF] - SMLicence.SMLicenceApplicationContractsModule 2024-10-16 11:30:30.276 +02:00 [INF] - Volo.Abp.FeatureManagement.AbpFeatureManagementApplicationContractsModule 2024-10-16 11:30:30.276 +02:00 [INF] - Volo.Abp.Application.AbpDddApplicationContractsModule 2024-10-16 11:30:30.276 +02:00 [INF] - Volo.Abp.SettingManagement.AbpSettingManagementApplicationContractsModule 2024-10-16 11:30:30.276 +02:00 [INF] - Volo.Abp.Identity.AbpIdentityApplicationContractsModule 2024-10-16 11:30:30.276 +02:00 [INF] - Volo.Abp.PermissionManagement.AbpPermissionManagementApplicationContractsModule 2024-10-16 11:30:30.276 +02:00 [INF] - Volo.Abp.Account.AbpAccountApplicationContractsModule 2024-10-16 11:30:30.276 +02:00 [INF] - Volo.Abp.TenantManagement.AbpTenantManagementApplicationContractsModule 2024-10-16 11:30:30.276 +02:00 [INF] - Volo.Abp.PermissionManagement.AbpPermissionManagementApplicationModule 2024-10-16 11:30:30.276 +02:00 [INF] - Volo.Abp.Application.AbpDddApplicationModule 2024-10-16 11:30:30.276 +02:00 [INF] - Volo.Abp.Http.AbpHttpAbstractionsModule 2024-10-16 11:30:30.276 +02:00 [INF] - Volo.Abp.GlobalFeatures.AbpGlobalFeaturesModule 2024-10-16 11:30:30.276 +02:00 [INF] - Volo.Abp.FeatureManagement.AbpFeatureManagementApplicationModule 2024-10-16 11:30:30.276 +02:00 [INF] - Volo.Abp.Identity.AbpIdentityApplicationModule 2024-10-16 11:30:30.276 +02:00 [INF] - Volo.Abp.Account.AbpAccountApplicationModule 2024-10-16 11:30:30.276 +02:00 [INF] - Volo.Abp.UI.Navigation.AbpUiNavigationModule 2024-10-16 11:30:30.276 +02:00 [INF] - Volo.Abp.UI.AbpUiModule 2024-10-16 11:30:30.276 +02:00 [INF] - Volo.Abp.TenantManagement.AbpTenantManagementApplicationModule 2024-10-16 11:30:30.276 +02:00 [INF] - Volo.Abp.SettingManagement.AbpSettingManagementApplicationModule 2024-10-16 11:30:30.276 +02:00 [INF] - Volo.Abp.Studio.Client.AspNetCore.AbpStudioClientAspNetCoreModule 2024-10-16 11:30:30.276 +02:00 [INF] - Volo.Abp.Studio.AbpStudioClientModule 2024-10-16 11:30:30.276 +02:00 [INF] - Volo.Abp.Studio.AbpStudioClientContractsModule 2024-10-16 11:30:30.276 +02:00 [INF] - Volo.Abp.AspNetCore.AbpAspNetCoreModule 2024-10-16 11:30:30.276 +02:00 [INF] - Volo.Abp.Http.AbpHttpModule 2024-10-16 11:30:30.276 +02:00 [INF] - Volo.Abp.Minify.AbpMinifyModule 2024-10-16 11:30:30.276 +02:00 [INF] - Volo.Abp.AspNetCore.AbpAspNetCoreAbstractionsModule 2024-10-16 11:30:30.276 +02:00 [INF] - SMLicence.EntityFrameworkCore.SMLicenceEntityFrameworkCoreModule 2024-10-16 11:30:30.276 +02:00 [INF] - Volo.Abp.PermissionManagement.EntityFrameworkCore.AbpPermissionManagementEntityFrameworkCoreModule 2024-10-16 11:30:30.276 +02:00 [INF] - Volo.Abp.EntityFrameworkCore.AbpEntityFrameworkCoreModule 2024-10-16 11:30:30.276 +02:00 [INF] - Volo.Abp.SettingManagement.EntityFrameworkCore.AbpSettingManagementEntityFrameworkCoreModule 2024-10-16 11:30:30.276 +02:00 [INF] - Volo.Abp.EntityFrameworkCore.SqlServer.AbpEntityFrameworkCoreSqlServerModule 2024-10-16 11:30:30.276 +02:00 [INF] - Volo.Abp.BackgroundJobs.EntityFrameworkCore.AbpBackgroundJobsEntityFrameworkCoreModule 2024-10-16 11:30:30.276 +02:00 [INF] - Volo.Abp.AuditLogging.EntityFrameworkCore.AbpAuditLoggingEntityFrameworkCoreModule 2024-10-16 11:30:30.276 +02:00 [INF] - Volo.Abp.FeatureManagement.EntityFrameworkCore.AbpFeatureManagementEntityFrameworkCoreModule 2024-10-16 11:30:30.276 +02:00 [INF] - Volo.Abp.Identity.EntityFrameworkCore.AbpIdentityEntityFrameworkCoreModule 2024-10-16 11:30:30.276 +02:00 [INF] - Volo.Abp.Users.EntityFrameworkCore.AbpUsersEntityFrameworkCoreModule 2024-10-16 11:30:30.276 +02:00 [INF] - Volo.Abp.OpenIddict.EntityFrameworkCore.AbpOpenIddictEntityFrameworkCoreModule 2024-10-16 11:30:30.276 +02:00 [INF] - Volo.Abp.TenantManagement.EntityFrameworkCore.AbpTenantManagementEntityFrameworkCoreModule 2024-10-16 11:30:30.276 +02:00 [INF] - Volo.Abp.BlobStoring.Database.EntityFrameworkCore.BlobStoringDatabaseEntityFrameworkCoreModule 2024-10-16 11:30:30.276 +02:00 [INF] - SMLicence.SMLicenceHttpApiModule 2024-10-16 11:30:30.276 +02:00 [INF] - Volo.Abp.PermissionManagement.HttpApi.AbpPermissionManagementHttpApiModule 2024-10-16 11:30:30.276 +02:00 [INF] - Volo.Abp.AspNetCore.Mvc.AbpAspNetCoreMvcModule 2024-10-16 11:30:30.276 +02:00 [INF] - Volo.Abp.ApiVersioning.AbpApiVersioningAbstractionsModule 2024-10-16 11:30:30.276 +02:00 [INF] - Volo.Abp.AspNetCore.Mvc.AbpAspNetCoreMvcContractsModule 2024-10-16 11:30:30.276 +02:00 [INF] - Volo.Abp.SettingManagement.AbpSettingManagementHttpApiModule 2024-10-16 11:30:30.276 +02:00 [INF] - Volo.Abp.Account.AbpAccountHttpApiModule 2024-10-16 11:30:30.276 +02:00 [INF] - Volo.Abp.Identity.AbpIdentityHttpApiModule 2024-10-16 11:30:30.276 +02:00 [INF] - Volo.Abp.TenantManagement.AbpTenantManagementHttpApiModule 2024-10-16 11:30:30.276 +02:00 [INF] - Volo.Abp.FeatureManagement.AbpFeatureManagementHttpApiModule 2024-10-16 11:30:30.276 +02:00 [INF] - Volo.Abp.Autofac.AbpAutofacModule 2024-10-16 11:30:30.276 +02:00 [INF] - Volo.Abp.Castle.AbpCastleCoreModule 2024-10-16 11:30:30.276 +02:00 [INF] - Volo.Abp.Swashbuckle.AbpSwashbuckleModule 2024-10-16 11:30:30.276 +02:00 [INF] - Volo.Abp.AspNetCore.Components.Server.LeptonXLiteTheme.AbpAspNetCoreComponentsServerLeptonXLiteThemeModule 2024-10-16 11:30:30.276 +02:00 [INF] - Volo.Abp.AspNetCore.Components.Web.LeptonXLiteTheme.AbpAspNetCoreComponentsWebLeptonXLiteThemeModule 2024-10-16 11:30:30.276 +02:00 [INF] - Volo.Abp.AspNetCore.Components.Web.Theming.AbpAspNetCoreComponentsWebThemingModule 2024-10-16 11:30:30.276 +02:00 [INF] - Volo.Abp.BlazoriseUI.AbpBlazoriseUIModule 2024-10-16 11:30:30.276 +02:00 [INF] - Volo.Abp.AspNetCore.Components.Web.AbpAspNetCoreComponentsWebModule 2024-10-16 11:30:30.276 +02:00 [INF] - Volo.Abp.AspNetCore.Components.AbpAspNetCoreComponentsModule 2024-10-16 11:30:30.276 +02:00 [INF] - Volo.Abp.AspNetCore.Components.Server.Theming.AbpAspNetCoreComponentsServerThemingModule 2024-10-16 11:30:30.276 +02:00 [INF] - Volo.Abp.AspNetCore.Components.Server.AbpAspNetCoreComponentsServerModule 2024-10-16 11:30:30.276 +02:00 [INF] - Volo.Abp.Http.Client.AbpHttpClientModule 2024-10-16 11:30:30.276 +02:00 [INF] - Volo.Abp.RemoteServices.AbpRemoteServicesModule 2024-10-16 11:30:30.276 +02:00 [INF] - Volo.Abp.AspNetCore.SignalR.AbpAspNetCoreSignalRModule 2024-10-16 11:30:30.276 +02:00 [INF] - Volo.Abp.AspNetCore.Mvc.UI.Packages.AbpAspNetCoreMvcUiPackagesModule 2024-10-16 11:30:30.276 +02:00 [INF] - Volo.Abp.AspNetCore.Mvc.UI.Bundling.AbpAspNetCoreMvcUiBundlingAbstractionsModule 2024-10-16 11:30:30.276 +02:00 [INF] - Volo.Abp.AspNetCore.Mvc.UI.Bundling.AbpAspNetCoreMvcUiBundlingModule 2024-10-16 11:30:30.276 +02:00 [INF] - Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.AbpAspNetCoreMvcUiBootstrapModule 2024-10-16 11:30:30.276 +02:00 [INF] - Volo.Abp.AspNetCore.Mvc.UI.AbpAspNetCoreMvcUiModule 2024-10-16 11:30:30.276 +02:00 [INF] - Volo.Abp.AspNetCore.Mvc.UI.Theme.LeptonXLite.AbpAspNetCoreMvcUiLeptonXLiteThemeModule 2024-10-16 11:30:30.276 +02:00 [INF] - Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.AbpAspNetCoreMvcUiThemeSharedModule 2024-10-16 11:30:30.276 +02:00 [INF] - Volo.Abp.AspNetCore.Mvc.UI.Widgets.AbpAspNetCoreMvcUiWidgetsModule 2024-10-16 11:30:30.276 +02:00 [INF] - Volo.Abp.AspNetCore.Mvc.UI.MultiTenancy.AbpAspNetCoreMvcUiMultiTenancyModule 2024-10-16 11:30:30.276 +02:00 [INF] - Volo.Abp.AspNetCore.MultiTenancy.AbpAspNetCoreMultiTenancyModule 2024-10-16 11:30:30.276 +02:00 [INF] - Volo.Abp.Identity.Blazor.Server.AbpIdentityBlazorServerModule 2024-10-16 11:30:30.276 +02:00 [INF] - Volo.Abp.Identity.Blazor.AbpIdentityBlazorModule 2024-10-16 11:30:30.276 +02:00 [INF] - Volo.Abp.PermissionManagement.Blazor.AbpPermissionManagementBlazorModule 2024-10-16 11:30:30.276 +02:00 [INF] - Volo.Abp.PermissionManagement.Blazor.Server.AbpPermissionManagementBlazorServerModule 2024-10-16 11:30:30.276 +02:00 [INF] - Volo.Abp.TenantManagement.Blazor.Server.AbpTenantManagementBlazorServerModule 2024-10-16 11:30:30.276 +02:00 [INF] - Volo.Abp.TenantManagement.Blazor.AbpTenantManagementBlazorModule 2024-10-16 11:30:30.276 +02:00 [INF] - Volo.Abp.FeatureManagement.Blazor.AbpFeatureManagementBlazorModule 2024-10-16 11:30:30.276 +02:00 [INF] - Volo.Abp.SettingManagement.Blazor.AbpSettingManagementBlazorModule 2024-10-16 11:30:30.276 +02:00 [INF] - Volo.Abp.FeatureManagement.Blazor.Server.AbpFeatureManagementBlazorServerModule 2024-10-16 11:30:30.276 +02:00 [INF] - Volo.Abp.Account.Web.AbpAccountWebOpenIddictModule 2024-10-16 11:30:30.276 +02:00 [INF] - Volo.Abp.Account.Web.AbpAccountWebModule 2024-10-16 11:30:30.276 +02:00 [INF] - Volo.Abp.Identity.AspNetCore.AbpIdentityAspNetCoreModule 2024-10-16 11:30:30.276 +02:00 [INF] - Volo.Abp.OpenIddict.AbpOpenIddictAspNetCoreModule 2024-10-16 11:30:30.276 +02:00 [INF] - Volo.Abp.AspNetCore.Serilog.AbpAspNetCoreSerilogModule 2024-10-16 11:30:30.276 +02:00 [INF] - Volo.Abp.SettingManagement.Blazor.Server.AbpSettingManagementBlazorServerModule 2024-10-16 11:30:30.290 +02:00 [DBG] Started background worker: Volo.Abp.BackgroundJobs.BackgroundJobWorker 2024-10-16 11:30:30.297 +02:00 [DBG] Started background worker: Volo.Abp.OpenIddict.Tokens.TokenCleanupBackgroundWorker 2024-10-16 11:30:30.331 +02:00 [FTL] Host terminated unexpectedly! Volo.Abp.AbpInitializationException: An error occurred during the initialize Volo.Abp.Modularity.OnApplicationInitializationModuleLifecycleContributor phase of the module Volo.Abp.AspNetCore.AbpAspNetCoreModule, Volo.Abp.AspNetCore, Version=8.3.1.0, Culture=neutral, PublicKeyToken=null: An exception was thrown while activating λ:Volo.Abp.AspNetCore.VirtualFileSystem.IWebContentFileProvider -> Volo.Abp.AspNetCore.VirtualFileSystem.WebContentFileProvider -> λ:Volo.Abp.VirtualFileSystem.IVirtualFileProvider -> Volo.Abp.VirtualFileSystem.VirtualFileProvider.. See the inner exception for details. ---> Autofac.Core.DependencyResolutionException: An exception was thrown while activating λ:Volo.Abp.AspNetCore.VirtualFileSystem.IWebContentFileProvider -> Volo.Abp.AspNetCore.VirtualFileSystem.WebContentFileProvider -> λ:Volo.Abp.VirtualFileSystem.IVirtualFileProvider -> Volo.Abp.VirtualFileSystem.VirtualFileProvider. ---> Autofac.Core.DependencyResolutionException: An exception was thrown while invoking the constructor 'Void .ctor(Microsoft.Extensions.Options.IOptions1[Volo.Abp.VirtualFileSystem.AbpVirtualFileSystemOptions], Volo.Abp.VirtualFileSystem.IDynamicFileProvider)' on type 'VirtualFileProvider'. ---> System.IO.DirectoryNotFoundException: /Users/enricoziehe/Projects/SMLicenseServer/src/SMLicence.Blazor/bin/Release/net8.0/SMLicence.Domain.Shared/ at Microsoft.Extensions.FileProviders.PhysicalFileProvider..ctor(String root, ExclusionFilters filters) at Volo.Abp.VirtualFileSystem.VirtualFileSetListExtensions.ReplaceEmbeddedByPhysical[T](VirtualFileSetList fileSets, String physicalPath) at SMLicence.Blazor.SMLicenceBlazorModule.<>c__DisplayClass6_0.<ConfigureVirtualFileSystem>b__0(AbpVirtualFileSystemOptions options) in /Users/enricoziehe/Projects/SMLicenseServer/src/SMLicence.Blazor/SMLicenceBlazorModule.cs:line 205 at Microsoft.Extensions.Options.OptionsFactory1.Create(String name) at Microsoft.Extensions.Options.UnnamedOptionsManager1.get_Value() at lambda_method1632(Closure, Object[]) at Autofac.Core.Activators.Reflection.BoundConstructor.Instantiate() --- End of inner exception stack trace --- at Autofac.Core.Activators.Reflection.BoundConstructor.Instantiate() at Autofac.Core.Activators.Reflection.ReflectionActivator.<>c__DisplayClass14_0.<UseSingleConstructorActivation>b__0(ResolveRequestContext context, Action1 next) at Autofac.Core.Resolving.Middleware.DelegateMiddleware.Execute(ResolveRequestContext context, Action1 next) at Autofac.Core.Resolving.Pipeline.ResolvePipelineBuilder.<>c__DisplayClass14_0.<BuildPipeline>b__1(ResolveRequestContext context) at Autofac.Core.Resolving.Middleware.DisposalTrackingMiddleware.Execute(ResolveRequestContext context, Action1 next) at Autofac.Core.Resolving.Pipeline.ResolvePipelineBuilder.<>cDisplayClass14_0.b1(ResolveRequestContext context) at Autofac.Builder.RegistrationBuilder`3.<>cDisplayClass41_0.b0(ResolveRequestContext context, Action1 next) at Autofac.Core.Resolving.Middleware.DelegateMiddleware.Execute(ResolveRequestContext context, Action1 next) at Autofac.Core.Resolving.Pipeline.ResolvePipelineBuilder.<>cDisplayClass14_0.b1(ResolveRequestContext context) at Autofac.Core.Resolving.Middleware.ActivatorErrorHandlingMiddleware.Execute(ResolveRequestContext context, Action1 next) --- End of inner exception stack trace --- at Autofac.Core.Resolving.Middleware.ActivatorErrorHandlingMiddleware.Execute(ResolveRequestContext context, Action1 next) at Autofac.Core.Resolving.Pipeline.ResolvePipelineBuilder.<>cDisplayClass14_0.b1(ResolveRequestContext context) at Autofac.Core.Pipeline.ResolvePipeline.Invoke(ResolveRequestContext context) at Autofac.Core.Resolving.Middleware.RegistrationPipelineInvokeMiddleware.Execute(ResolveRequestContext context, Action1 next) at Autofac.Core.Resolving.Pipeline.ResolvePipelineBuilder.<>c__DisplayClass14_0.<BuildPipeline>b__1(ResolveRequestContext context) at Autofac.Core.Resolving.Middleware.SharingMiddleware.<>c__DisplayClass5_0.<Execute>b__0() at Autofac.Core.Lifetime.LifetimeScope.CreateSharedInstance(Guid id, Func1 creator) at Autofac.Core.Lifetime.LifetimeScope.CreateSharedInstance(Guid primaryId, Nullable1 qualifyingId, Func1 creator) at Autofac.Core.Resolving.Middleware.SharingMiddleware.Execute(ResolveRequestContext context, Action1 next) at Autofac.Core.Resolving.Pipeline.ResolvePipelineBuilder.<>c__DisplayClass14_0.<BuildPipeline>b__1(ResolveRequestContext context) at Autofac.Core.Resolving.Pipeline.ResolvePipelineBuilder.<>c__DisplayClass14_0.<BuildPipeline>b__1(ResolveRequestContext context) at Autofac.Core.Resolving.Middleware.CircularDependencyDetectorMiddleware.Execute(ResolveRequestContext context, Action1 next) at Autofac.Core.Resolving.Pipeline.ResolvePipelineBuilder.<>cDisplayClass14_0.b1(ResolveRequestContext context) at Autofac.Extensions.DependencyInjection.KeyedServiceMiddleware.Execute(ResolveRequestContext context, Action`1 next) at Autofac.Core.Resolving.Pipeline.ResolvePipelineBuilder.<>cDisplayClass14_0.b1(ResolveRequestContext context) at Autofac.Core.Pipeline.ResolvePipeline.Invoke(ResolveRequestContext context) at Autofac.Core.Resolving.ResolveOperation.GetOrCreateInstance(ISharingLifetimeScope currentOperationScope, ResolveRequest& request) at Autofac.Core.Resolving.ResolveOperation.ExecuteOperation(ResolveRequest& request) at Autofac.Core.Resolving.ResolveOperation.Execute(ResolveRequest& request) at Autofac.Core.Lifetime.LifetimeScope.ResolveComponent(ResolveRequest& request) at Autofac.Core.Lifetime.LifetimeScope.Autofac.IComponentContext.ResolveComponent(ResolveRequest& request) at Autofac.ResolutionExtensions.TryResolveService(IComponentContext context, Service service, IEnumerable1 parameters, Object& instance) at Autofac.ResolutionExtensions.ResolveService(IComponentContext context, Service service, IEnumerable1 parameters) at Autofac.ResolutionExtensions.Resolve(IComponentContext context, Type serviceType, IEnumerable`1 parameters) at Autofac.ResolutionExtensions.Resolve(IComponentContext context, Type serviceType) at Autofac.Extensions.DependencyInjection.AutofacServiceProvider.GetRequiredService(Type serviceType) at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService(IServiceProvider provider, Type serviceType) at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService[T](IServiceProvider provider) at Volo.Abp.AspNetCore.AbpAspNetCoreModule.OnApplicationInitialization(ApplicationInitializationContext context) at Volo.Abp.Modularity.AbpModule.OnApplicationInitializationAsync(ApplicationInitializationContext context) at Volo.Abp.Modularity.OnApplicationInitializationModuleLifecycleContributor.InitializeAsync(ApplicationInitializationContext context, IAbpModule module) at Volo.Abp.Modularity.ModuleManager.InitializeModulesAsync(ApplicationInitializationContext context) --- End of inner exception stack trace --- at Volo.Abp.Modularity.ModuleManager.InitializeModulesAsync(ApplicationInitializationContext context) at Volo.Abp.AbpApplicationBase.InitializeModulesAsync() at Volo.Abp.AbpApplicationWithExternalServiceProvider.InitializeAsync(IServiceProvider serviceProvider) at Microsoft.AspNetCore.Builder.AbpApplicationBuilderExtensions.InitializeApplicationAsync(IApplicationBuilder app) at SMLicence.Blazor.Program.Main(String[] args) in /Users/enricoziehe/Projects/SMLicenseServer/src/SMLicence.Blazor/Program.cs:line 47

maliming commented 1 week ago

Please share the files in bin/Release/net8.0

enny1170 commented 1 week ago

https://1drv.ms/u/s!Av2y15Jd37R7ho1FrNE6VX5JLhw0vA?e=KVmaGu pls use this link, because to big for github

Von: maliming @.> Datum: Mittwoch, 16. Oktober 2024 um 11:48 An: abpframework/abp @.> Cc: enny @.>, Author @.> Betreff: Re: [abpframework/abp] Blazor-Server app run only in Development Environment (Issue #21077)

Please share the files in bin/Release/net8.0

— Reply to this email directly, view it on GitHubhttps://github.com/abpframework/abp/issues/21077#issuecomment-2416293561, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AEJWEUEHTHR63LPOBVLBAKLZ3YY7TAVCNFSM6AAAAABP5VHSTSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIMJWGI4TGNJWGE. You are receiving this because you authored the thread.Message ID: @.***>

maliming commented 1 week ago

Can you share your project source code?

I have tested in a new template project but it works.

enny1170 commented 1 week ago

You can download a test solution here https://1drv.ms/u/s!Av2y15Jd37R7ho1YgM5KQqVfbV0okg?e=YCzKEm

This is created by abp-cli -ui blazor-server. No other changes. Same behavior. Build in release mode try to start them.

Bests Enrico

Von: maliming @.> Datum: Donnerstag, 17. Oktober 2024 um 03:53 An: abpframework/abp @.> Cc: enny @.>, Author @.> Betreff: Re: [abpframework/abp] Blazor-Server app run only in Development Environment (Issue #21077)

Can you share your project source code?

I have tested in a new template project but it works.

— Reply to this email directly, view it on GitHubhttps://github.com/abpframework/abp/issues/21077#issuecomment-2418326706, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AEJWEUB7GA6HYMDXDQFDRETZ34KBDAVCNFSM6AAAAABP5VHSTSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIMJYGMZDMNZQGY. You are receiving this because you authored the thread.Message ID: @.***>

maliming commented 1 week ago

This is not a blazor app.

image

enny1170 commented 1 week ago

Sorry my fail, here is a new one https://1drv.ms/u/s!Av2y15Jd37R7ho1ZS0cvO6VHdj840g?e=j9bslS

A additional note, I found during tests when i create the app with abp new testapp2 -u blazor-server -dbms SQLite the creation process runs without error, and the resulting project works a expected. A try without the -dbms option results in a error during the creation process on my mac because Localdb ist not supported on Mac. So I do abp install-lib by hand , compile the project without problem and results in the behavior described.

I believe this is the cause of the problem. The question is now, what is missing in the project because of this error. And how can I fix it in a already developed Project.

Von: maliming @.> Datum: Freitag, 18. Oktober 2024 um 09:18 An: abpframework/abp @.> Cc: enny @.>, Author @.> Betreff: Re: [abpframework/abp] Blazor-Server app run only in Development Environment (Issue #21077)

This is not a blazor app.

image.png (view on web)https://github.com/user-attachments/assets/1ab2d5a5-f4fe-4386-a682-33fcd3b3705e

— Reply to this email directly, view it on GitHubhttps://github.com/abpframework/abp/issues/21077#issuecomment-2421624773, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AEJWEUFZ4V6LJJTKY3AD7TDZ4CY2VAVCNFSM6AAAAABP5VHSTSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIMRRGYZDINZXGM. You are receiving this because you authored the thread.Message ID: @.***>

maliming commented 5 days ago

hi

The problem is about openiddict.pfx file.

Make sure your app's current directory has this file. I will do some enhancement for it.

Generating a Signing Certificate

In the production environment, you need to use a production signing certificate. ABP Framework sets up signing and encryption certificates in your application and expects an openiddict.pfx file in your application.

To generate a signing certificate, you can use the following command:

dotnet dev-certs https -v -ep openiddict.pfx -p your_random_password

fa280ccf-2601-4ec2-b980-46dbc0c4dca6 is the password of the certificate, you can change it to any password you want.

It is recommended to use two RSA certificates, distinct from the certificate(s) used for HTTPS: one for encryption, one for signing.

For more information, please refer to: https://documentation.openiddict.com/configuration/encryption-and-signing-credentials.html#registering-a-certificate-recommended-for-production-ready-scenarios

Also, see the Configuring OpenIddict documentation for more information.

enny1170 commented 4 days ago

Hello, that does not help.

I have generated a openiddict.pfx and also a authserver.pfx. and copy them to bin/Release/net8.0 Try to start the App from this directory. Same behavior.

Von: maliming @.> Datum: Sonntag, 20. Oktober 2024 um 12:12 An: abpframework/abp @.> Cc: enny @.>, Author @.> Betreff: Re: [abpframework/abp] Blazor-Server app run only in Development Environment (Issue #21077)

hi

The problem is about openiddict.pfx file.

Make sure your app's current directory has this file. I will do some enhancement for it.

Generating a Signing Certificate

In the production environment, you need to use a production signing certificate. ABP Framework sets up signing and encryption certificates in your application and expects an openiddict.pfx file in your application.

To generate a signing certificate, you can use the following command:

dotnet dev-certs https -v -ep openiddict.pfx -p your_random_password

fa280ccf-2601-4ec2-b980-46dbc0c4dca6 is the password of the certificate, you can change it to any password you want.

It is recommended to use two RSA certificates, distinct from the certificate(s) used for HTTPS: one for encryption, one for signing.

For more information, please refer to: https://documentation.openiddict.com/configuration/encryption-and-signing-credentials.html#registering-a-certificate-recommended-for-production-ready-scenarios

Also, see the Configuring OpenIddicthttps://docs.abp.io/en/abp/latest/Deployment/Configuring-OpenIddict#production-environment documentation for more information.

— Reply to this email directly, view it on GitHubhttps://github.com/abpframework/abp/issues/21077#issuecomment-2424805725, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AEJWEUC5SM6EIUEXX3R32B3Z4N6YPAVCNFSM6AAAAABP5VHSTSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIMRUHAYDKNZSGU. You are receiving this because you authored the thread.Message ID: @.***>

maliming commented 4 days ago

hi

Please update your Program.cs as below to see the error logs:

using System;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Builder;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using Serilog;
using Serilog.Events;

namespace testapp2.Blazor;

public class Program
{
    public async static Task<int> Main(string[] args)
    {
        Log.Logger = new LoggerConfiguration()
#if DEBUG
            .MinimumLevel.Debug()
#else
            .MinimumLevel.Information()
#endif
            .MinimumLevel.Override("Microsoft", LogEventLevel.Information)
            .MinimumLevel.Override("Microsoft.EntityFrameworkCore", LogEventLevel.Warning)
            .Enrich.FromLogContext()
            .WriteTo.Async(c => c.File("Logs/logs.txt"))
            .WriteTo.Async(c => c.Console())
            .CreateLogger();

        try
        {
            Log.Information("Starting web host.");
            var builder = WebApplication.CreateBuilder(args);
            builder.Host
                .AddAppSettingsSecretsJson()
                .UseAutofac()
                .UseSerilog((context, services, loggerConfiguration) =>
                {
                    loggerConfiguration.WriteTo.Async(c => c.AbpStudio(services));
                });
            await builder.AddApplicationAsync<testapp2BlazorModule>();
            var app = builder.Build();
            await app.InitializeApplicationAsync();
            await app.RunAsync();
            return 0;
        }
        catch (Exception ex)
        {
            if (ex is HostAbortedException)
            {
                throw;
            }

            Log.Fatal(ex, "Host terminated unexpectedly!");
            return 1;
        }
        finally
        {
            Log.CloseAndFlush();
        }
    }
}
enny1170 commented 4 days ago

Thanks, that helps i got it working now. In my Case the pfx has to be named as authserver.pfx if voung in xxxBlazorModule.cs

private X509Certificate2 GetSigningCertificate(IWebHostEnvironment hostingEnv)
{
    var fileName = "authserver.pfx";
    var passPhrase = "FujjIymEdsSzyviN";
    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);
}

Maybe part or generated by template. So the hint and docu about openiddict.pfx can be mistaken.

Thanks and beste Enrico

Von: maliming @.> Datum: Montag, 21. Oktober 2024 um 13:54 An: abpframework/abp @.> Cc: enny @.>, Author @.> Betreff: Re: [abpframework/abp] Blazor-Server app run only in Development Environment (Issue #21077)

hi

Please update your Program.cs as below to see the error logs:

using System;

using System.Threading.Tasks;

using Microsoft.AspNetCore.Builder;

using Microsoft.Extensions.DependencyInjection;

using Microsoft.Extensions.Hosting;

using Serilog;

using Serilog.Events;

namespace testapp2.Blazor;

public class Program

{

public async static Task<int> Main(string[] args)

{

    Log.Logger = new LoggerConfiguration()

if DEBUG

        .MinimumLevel.Debug()

else

        .MinimumLevel.Information()

endif

        .MinimumLevel.Override("Microsoft", LogEventLevel.Information)

        .MinimumLevel.Override("Microsoft.EntityFrameworkCore", LogEventLevel.Warning)

        .Enrich.FromLogContext()

        .WriteTo.Async(c => c.File("Logs/logs.txt"))

        .WriteTo.Async(c => c.Console())

        .CreateLogger();

    try

    {

        Log.Information("Starting web host.");

        var builder = WebApplication.CreateBuilder(args);

        builder.Host

            .AddAppSettingsSecretsJson()

            .UseAutofac()

            .UseSerilog((context, services, loggerConfiguration) =>

            {

                loggerConfiguration.WriteTo.Async(c => c.AbpStudio(services));

            });

        await builder.AddApplicationAsync<testapp2BlazorModule>();

        var app = builder.Build();

        await app.InitializeApplicationAsync();

        await app.RunAsync();

        return 0;

    }

    catch (Exception ex)

    {

        if (ex is HostAbortedException)

        {

            throw;

        }

        Log.Fatal(ex, "Host terminated unexpectedly!");

        return 1;

    }

    finally

    {

        Log.CloseAndFlush();

    }

}

}

— Reply to this email directly, view it on GitHubhttps://github.com/abpframework/abp/issues/21077#issuecomment-2426458801, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AEJWEUAAXAHNOMTEO3IEK5TZ4TTOFAVCNFSM6AAAAABP5VHSTSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIMRWGQ2TQOBQGE. You are receiving this because you authored the thread.Message ID: @.***>