Ends in:
7 DAYS
11 HRS
59 MIN
58 SEC
Ends in:
7 D
11 H
59 M
58 S

Activities of "koraykirdinli"

Answer

Ok I will check but

we We noticed the following: we created two projects from scratch. For the first one, we did not create a separate auth server, and your default project got a 500.30 error when hosted on IIS. However, when we created the separate auth server, we were able to run it this time. Could there be a different situation here? Could you also check this on your side with this in mind?

abp new AbpDeneme2 -u angular -m none --separate-auth-server --theme leptonx -csf

Answer

Yes my app is run on IIS.

Answer

Sorry the demo project config is like below

"Default": "Server=(LocalDb)\MSSQLLocalDB;Database=AbpSolution2;Trusted_Connection=True;TrustServerCertificate=true",

Answer

Hi again. I tried to create a new demo project from scratch to fix the issue. My connectionstring is like below but I got the sql connection error. I can also connect from the SQL Management Studio.

"Default": "Server=(localdb)\\MSSQLLocalDB;Database=PaymentManagement;Trusted_Connection=True;TrustServerCertificate=false",

2024-10-22 22:52:22.424 +03:00 [INF]     - Volo.Abp.Gdpr.AbpGdprEntityFrameworkCoreModule
2024-10-22 22:52:22.424 +03:00 [INF]     - Volo.Abp.BlobStoring.Database.EntityFrameworkCore.BlobStoringDatabaseEntityFrameworkCoreModule
2024-10-22 22:52:22.424 +03:00 [INF]   - Volo.Abp.Swashbuckle.AbpSwashbuckleModule
2024-10-22 22:52:22.424 +03:00 [INF]   - Volo.Abp.AspNetCore.Serilog.AbpAspNetCoreSerilogModule
2024-10-22 22:52:23.677 +03:00 [INF] Saving external localizations...
2024-10-22 22:52:23.829 +03:00 [INF] Initialized all ABP modules.
2024-10-22 22:52:23.892 +03:00 [INF] Initializing UI Database
2024-10-22 22:52:26.025 +03:00 [INF] Saving healthchecks configuration to database
2024-10-22 22:52:26.562 +03:00 [INF] Request starting HTTP/1.1 GET http://localhost:44349/ - null null
2024-10-22 22:52:26.576 +03:00 [WRN] The 'WebRootPath' is not set! The 'CheckLibs' feature is disabled!
2024-10-22 22:52:26.609 +03:00 [ERR] GetHealthReport threw an exception when trying to get report from /health-status configured with name AbpSolution2 Health Status.
System.InvalidOperationException: Could not get endpoint uri from configuration
   at HealthChecks.UI.Core.HostedService.HealthCheckReportCollector.GetEndpointUri(HealthCheckConfiguration configuration) in /_/src/HealthChecks.UI/Core/HostedService/HealthCheckReportCollector.cs:line 176
   at HealthChecks.UI.Core.HostedService.HealthCheckReportCollector.GetHealthReportAsync(HealthCheckConfiguration configuration) in /_/src/HealthChecks.UI/Core/HostedService/HealthCheckReportCollector.cs:line 118
2024-10-22 22:52:27.080 +03:00 [INF] Application started. Press Ctrl+C to shut down.
2024-10-22 22:52:27.081 +03:00 [INF] Hosting environment: Production
2024-10-22 22:52:27.081 +03:00 [INF] Content root path: C:\inetpub\wwwroot\AbpDeneme2
2024-10-22 22:52:27.211 +03:00 [INF] Completed to save external localizations.
2024-10-22 22:52:27.447 +03:00 [INF] Executing endpoint 'AbpSolution2.Controllers.HomeController.Index (AbpSolution2.HttpApi.Host)'
2024-10-22 22:52:27.487 +03:00 [INF] Route matched with {action = "Index", controller = "Home", area = "", page = ""}. Executing controller action with signature Microsoft.AspNetCore.Mvc.ActionResult Index() on controller AbpSolution2.Controllers.HomeController (AbpSolution2.HttpApi.Host).
2024-10-22 22:52:27.534 +03:00 [INF] Executing RedirectResult, redirecting to /swagger.
2024-10-22 22:52:27.544 +03:00 [INF] Executed action AbpSolution2.Controllers.HomeController.Index (AbpSolution2.HttpApi.Host) in 47.9922ms
2024-10-22 22:52:27.544 +03:00 [INF] Executed endpoint 'AbpSolution2.Controllers.HomeController.Index (AbpSolution2.HttpApi.Host)'
2024-10-22 22:52:27.612 +03:00 [INF] Request starting HTTP/1.1 GET http://localhost:44349/swagger/index.html - null null
2024-10-22 22:52:27.613 +03:00 [INF] Request finished HTTP/1.1 GET http://localhost:44349/ - 302 null null 1052.877ms
2024-10-22 22:52:27.720 +03:00 [INF] Request finished HTTP/1.1 GET http://localhost:44349/swagger/index.html - 200 null text/html;charset=utf-8 108.2377ms
2024-10-22 22:52:28.009 +03:00 [INF] Request starting HTTP/1.1 GET http://localhost:44349/swagger/v1/swagger.json - null null
2024-10-22 22:52:33.336 +03:00 [INF] Request finished HTTP/1.1 GET http://localhost:44349/swagger/v1/swagger.json - 200 null application/json;charset=utf-8 5325.7166ms
2024-10-22 22:52:33.495 +03:00 [INF] Request starting HTTP/1.1 GET http://localhost:44349/api/abp/application-configuration - null null
2024-10-22 22:52:33.510 +03:00 [INF] Executing endpoint 'Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.AbpApplicationConfigurationController.GetAsync (Volo.Abp.AspNetCore.Mvc)'
2024-10-22 22:52:33.533 +03:00 [INF] Route matched with {area = "abp", action = "Get", controller = "AbpApplicationConfiguration", page = ""}. Executing controller action with signature System.Threading.Tasks.Task`1[Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ApplicationConfigurationDto] GetAsync(Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ApplicationConfigurationRequestOptions) on controller Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.AbpApplicationConfigurationController (Volo.Abp.AspNetCore.Mvc).
2024-10-22 22:52:33.690 +03:00 [WRN] The cookie 'XSRF-TOKEN' has set 'SameSite=None' and must also set 'Secure'.
2024-10-22 22:52:37.158 +03:00 [ERR] GetHealthReport threw an exception when trying to get report from /health-status configured with name AbpSolution2 Health Status.
System.InvalidOperationException: Could not get endpoint uri from configuration
   at HealthChecks.UI.Core.HostedService.HealthCheckReportCollector.GetEndpointUri(HealthCheckConfiguration configuration) in /_/src/HealthChecks.UI/Core/HostedService/HealthCheckReportCollector.cs:line 176
   at HealthChecks.UI.Core.HostedService.HealthCheckReportCollector.GetHealthReportAsync(HealthCheckConfiguration configuration) in /_/src/HealthChecks.UI/Core/HostedService/HealthCheckReportCollector.cs:line 118
2024-10-22 22:52:37.168 +03:00 [INF] Notification is sent on same window time.
2024-10-22 22:52:41.393 +03:00 [ERR] An error occurred using the connection to database 'AbpSolution2' on server '(LocalDb)\MSSQLLocalDB'.
2024-10-22 22:52:41.393 +03:00 [ERR] An error occurred using the connection to database 'AbpSolution2' on server '(LocalDb)\MSSQLLocalDB'.
2024-10-22 22:52:41.393 +03:00 [ERR] An error occurred using the connection to database 'AbpSolution2' on server '(LocalDb)\MSSQLLocalDB'.
2024-10-22 22:52:41.410 +03:00 [ERR] An exception occurred while iterating over the results of a query for context type 'Volo.Abp.PermissionManagement.EntityFrameworkCore.PermissionManagementDbContext'.
Microsoft.Data.SqlClient.SqlException (0x80131904): A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 50 - Local Database Runtime error occurred. Cannot create an automatic instance. See the Windows Application event log for error details.
)
 ---> System.ComponentModel.Win32Exception (0x89C50118): Unknown error (0x89c50118)
   at Microsoft.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
   at Microsoft.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
   at Microsoft.Data.SqlClient.TdsParser.Connect(ServerInfo serverInfo, SqlInternalConnectionTds connHandler, Boolean ignoreSniOpenTimeout, Int64 timerExpire, SqlConnectionString connectionOptions, Boolean withFailover)
   at Microsoft.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo serverInfo, String newPassword, SecureString newSecurePassword, Boolean ignoreSniOpenTimeout, TimeoutTimer timeout, Boolean withFailover)
   at Microsoft.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(ServerInfo serverInfo, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance, SqlConnectionString connectionOptions, SqlCredential credential, TimeoutTimer timeout)
   at Microsoft.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(TimeoutTimer timeout, SqlConnectionString connectionOptions, SqlCredential credential, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance)
   at Microsoft.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, SqlCredential credential, Object providerInfo, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance, SqlConnectionString userConnectionOptions, SessionData reconnectSessionData, Boolean applyTransientFaultHandling, String accessToken, DbConnectionPool pool)
   at Microsoft.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, DbConnectionPoolKey poolKey, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection, DbConnectionOptions userOptions)
   at Microsoft.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnectionPool pool, DbConnection owningObject, DbConnectionOptions options, DbConnectionPoolKey poolKey, DbConnectionOptions userOptions)
   at Microsoft.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection)
   at Microsoft.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection)
   at Microsoft.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, UInt32 waitForMultipleObjectsTimeout, Boolean allowCreate, Boolean onlyOneCheckConnection, DbConnectionOptions userOptions, DbConnectionInternal& connection)
   at Microsoft.Data.ProviderBase.DbConnectionPool.WaitForPendingOpen()
--- End of stack trace from previous location ---

Answer

By the way

options.AddDevelopmentEncryptionAndSigningCertificate = true;

I also just try true, but i was false

Answer

public override void PreConfigureServices(ServiceConfigurationContext context) { //PaymentManagementDtoExtensions.Configure();

 var hostingEnvironment = context.Services.GetHostingEnvironment();
 var configuration = context.Services.GetConfiguration();

 PreConfigure<OpenIddictBuilder>(builder =>
 {
     builder.AddValidation(options =>
     {
         options.AddAudiences("PaymentManagement");
         options.UseLocalServer();
         options.UseAspNetCore();
     });
 });

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

     PreConfigure<OpenIddictServerBuilder>(serverBuilder =>
     {
         //serverBuilder.AddProductionEncryptionAndSigningCertificate("openiddict.pfx", "00000000 - 0000 - 0000 - 0000 - 000000000000");
         serverBuilder.AddProductionEncryptionAndSigningCertificate("openiddict.pfx", "00000000-0000-0000-0000-000000000000");
     });
 }

}

Answer

I mean my our application do not use external auth server. As you see below picture we host auth server built-in.

I also achieve to write stdoutlogs

EVENTLOGS Application '/LM/W3SVC/2/ROOT' with physical root 'C:\inetpub\wwwroot\PayosGate\PayosGateApiV2' has exited from Program.Main with exit code = '1'. First 30KB characters of captured stdout and stderr logs: [09:35:33 INF] Starting PaymentManagement.HttpApi.Host.

Cannot get a local application data path. Most probably a user profile is not loaded. If LocalDB is executed under IIS, make sure that profile loading is enabled for the current user.

Windows API call SHGetKnownFolderPath returned error code: 5. Windows system error message is: Erişim engellendi. Reported at line: 427.

My Code is :

public class PaymentManagementHttpApiHostModule : AbpModule

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

    PreConfigure<OpenIddictBuilder>(builder =>
    {
        builder.AddValidation(options =>
        {
            options.AddAudiences("PaymentManagement");
            options.UseLocalServer();
            options.UseAspNetCore();
        });
    });

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

        PreConfigure<OpenIddictServerBuilder>(serverBuilder =>
        {
            serverBuilder.AddProductionEncryptionAndSigningCertificate("openiddict.pfx", "00000000-0000-0000-0000-000000000000");
            serverBuilder.SetIssuer(new Uri(configuration["AuthServer:Authority"]!));
        });
    }
}

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;
    }

    if (!configuration.GetValue<bool>("AuthServer:RequireHttpsMetadata"))
    {
        Configure<OpenIddictServerAspNetCoreOptions>(options =>
        {
            options.DisableTransportSecurityRequirement = true;
        });
    }

    ConfigureAuthentication(context);
    ConfigureUrls(configuration);
    ConfigureBundles();
    ConfigureConventionalControllers();
    ConfigureExternalProviders(context);
    ConfigureImpersonation(context, configuration);
    ConfigureHealthChecks(context);
    ConfigureSwagger(context, configuration);
    ConfigureVirtualFileSystem(context);
    ConfigureCors(context, configuration);
    ConfigureTheme();
    ConfigureHangfire(context, configuration);
}

private void ConfigureTheme()
{
    Configure<LeptonXThemeOptions>(options =>
    {
        options.DefaultStyle = LeptonXStyleNames.System;
    });
}

private void ConfigureAuthentication(ServiceConfigurationContext context)
{
    context.Services.ForwardIdentityAuthenticationForBearer(OpenIddictValidationAspNetCoreDefaults.AuthenticationScheme);
    context.Services.Configure<AbpClaimsPrincipalFactoryOptions>(options =>
    {
        options.IsDynamicClaimsEnabled = true;
    });
}

private void ConfigureUrls(IConfiguration configuration)
{
    Configure<AppUrlOptions>(options =>
    {
        options.Applications["MVC"].RootUrl = configuration["App:SelfUrl"];
        options.Applications["Angular"].RootUrl = configuration["App:AngularUrl"];
        options.Applications["Angular"].Urls[AccountUrlNames.PasswordReset] = "account/reset-password";
        options.Applications["Angular"].Urls[AccountUrlNames.EmailConfirmation] = "account/email-confirmation";
        options.RedirectAllowedUrls.AddRange(configuration["App:RedirectAllowedUrls"]?.Split(',') ?? Array.Empty<string>());
    });
}

private void ConfigureBundles()
{
    Configure<AbpBundlingOptions>(options =>
    {
        options.StyleBundles.Configure(
            LeptonXThemeBundles.Styles.Global,
            bundle =>
            {
                bundle.AddFiles("/global-styles.css");
            }
        );
    });
}


private void ConfigureVirtualFileSystem(ServiceConfigurationContext context)
{
    var hostingEnvironment = context.Services.GetHostingEnvironment();

    if (hostingEnvironment.IsDevelopment())
    {
        Configure<AbpVirtualFileSystemOptions>(options =>
        {
            options.FileSets.ReplaceEmbeddedByPhysical<PaymentManagementDomainSharedModule>(Path.Combine(hostingEnvironment.ContentRootPath, $"..{Path.DirectorySeparatorChar}PaymentManagement.Domain.Shared"));
            options.FileSets.ReplaceEmbeddedByPhysical<PaymentManagementDomainModule>(Path.Combine(hostingEnvironment.ContentRootPath, $"..{Path.DirectorySeparatorChar}PaymentManagement.Domain"));
            options.FileSets.ReplaceEmbeddedByPhysical<PaymentManagementApplicationContractsModule>(Path.Combine(hostingEnvironment.ContentRootPath, $"..{Path.DirectorySeparatorChar}PaymentManagement.Application.Contracts"));
            options.FileSets.ReplaceEmbeddedByPhysical<PaymentManagementApplicationModule>(Path.Combine(hostingEnvironment.ContentRootPath, $"..{Path.DirectorySeparatorChar}PaymentManagement.Application"));
        });
    }
}

private void ConfigureConventionalControllers()
{
    Configure<AbpAspNetCoreMvcOptions>(options =>
    {
        options.ConventionalControllers.Create(typeof(PaymentManagementApplicationModule).Assembly);
    });
}

private static void ConfigureSwagger(ServiceConfigurationContext context, IConfiguration configuration)
{
    context.Services.AddAbpSwaggerGenWithOidc(
        configuration["AuthServer:Authority"]!,
        ["PaymentManagement"],
        [AbpSwaggerOidcFlows.AuthorizationCode],
        null,
        options =>
        {
            options.SwaggerDoc("v1", new OpenApiInfo { Title = "PaymentManagement API", Version = "v1" });
            options.DocInclusionPredicate((docName, description) => true);
            options.CustomSchemaIds(type => type.FullName);
            options.HideAbpEndpoints();
        });
}

private void ConfigureCors(ServiceConfigurationContext context, IConfiguration configuration)
{
    context.Services.AddCors(options =>
    {
        options.AddDefaultPolicy(builder =>
        {
            builder
                .WithOrigins(
                    configuration["App:CorsOrigins"]?
                        .Split(",", StringSplitOptions.RemoveEmptyEntries)
                        .Select(o => o.Trim().RemovePostFix("/"))
                        .ToArray() ?? Array.Empty<string>()
                )
                .WithAbpExposedHeaders()
                .SetIsOriginAllowedToAllowWildcardSubdomains()
                .AllowAnyHeader()
                .AllowAnyMethod()
                .AllowCredentials();
        });
    });
}

private void ConfigureExternalProviders(ServiceConfigurationContext context)
{
    context.Services.AddAuthentication()
        .AddGoogle(GoogleDefaults.AuthenticationScheme, options =>
        {
            options.ClaimActions.MapJsonKey(AbpClaimTypes.Picture, "picture");
        })
        .WithDynamicOptions<GoogleOptions, GoogleHandler>(
            GoogleDefaults.AuthenticationScheme,
            options =>
            {
                options.WithProperty(x => x.ClientId);
                options.WithProperty(x => x.ClientSecret, isSecret: true);
            }
        )
        .AddMicrosoftAccount(MicrosoftAccountDefaults.AuthenticationScheme, options =>
        {
            //Personal Microsoft accounts as an example.
            options.AuthorizationEndpoint = "https://login.microsoftonline.com/consumers/oauth2/v2.0/authorize";
            options.TokenEndpoint = "https://login.microsoftonline.com/consumers/oauth2/v2.0/token";

            options.ClaimActions.MapCustomJson("picture", _ => "https://graph.microsoft.com/v1.0/me/photo/$value");
            options.SaveTokens = true;
        })
        .WithDynamicOptions<MicrosoftAccountOptions, MicrosoftAccountHandler>(
            MicrosoftAccountDefaults.AuthenticationScheme,
            options =>
            {
                options.WithProperty(x => x.ClientId);
                options.WithProperty(x => x.ClientSecret, isSecret: true);
            }
        )
        .AddTwitter(TwitterDefaults.AuthenticationScheme, options =>
        {
            options.ClaimActions.MapJsonKey(AbpClaimTypes.Picture, "profile_image_url_https");
            options.RetrieveUserDetails = true;
        })
        .WithDynamicOptions<TwitterOptions, TwitterHandler>(
            TwitterDefaults.AuthenticationScheme,
            options =>
            {
                options.WithProperty(x => x.ConsumerKey);
                options.WithProperty(x => x.ConsumerSecret, isSecret: true);
            }
        );
}

private void ConfigureImpersonation(ServiceConfigurationContext context, IConfiguration configuration)
{
    context.Services.Configure<AbpAccountOptions>(options =>
    {
        options.TenantAdminUserName = "admin";
        options.ImpersonationTenantPermission = SaasHostPermissions.Tenants.Impersonation;
        options.ImpersonationUserPermission = IdentityPermissions.Users.Impersonation;
    });
}

private void ConfigureHealthChecks(ServiceConfigurationContext context)
{
    context.Services.AddPaymentManagementHealthChecks();
}

private void ConfigureHangfire(ServiceConfigurationContext context, IConfiguration configuration)
{
    context.Services.AddHangfire(config =>
    {
        config.UseSqlServerStorage(configuration.GetConnectionString("Default"));
    });
    //context.Services.AddHangfireServer();
}

public override void OnApplicationInitialization(ApplicationInitializationContext context)
{
    var app = context.GetApplicationBuilder();
    var env = context.GetEnvironment();

    if (env.IsDevelopment())
    {
        app.UseDeveloperExceptionPage();
    }

    app.UseAbpRequestLocalization();

    if (!env.IsDevelopment())
    {
        app.UseErrorPage();
    }
    
    app.UseStaticFiles();
    app.UseAbpStudioLink();
    app.UseRouting();
    app.UseAbpSecurityHeaders();
    app.UseCors();
    app.UseAuthentication();
    app.UseAbpOpenIddictValidation();

    if (MultiTenancyConsts.IsEnabled)
    {
        app.UseMultiTenancy();
    }

    app.UseUnitOfWork();
    app.UseDynamicClaims();
    app.UseAuthorization();

    app.UseSwagger();
    app.UseAbpSwaggerUI(options =>
    {
        options.SwaggerEndpoint("/swagger/v1/swagger.json", "PaymentManagement API");

        var configuration = context.ServiceProvider.GetRequiredService<IConfiguration>();
        options.OAuthClientId(configuration["AuthServer:SwaggerClientId"]);
        options.OAuthClientSecret(configuration["AuthServer:SwaggerClientSecret"]);
    });
    app.UseAuditing();
    app.UseAbpSerilogEnrichers();
    app.UseAbpHangfireDashboard();
    app.UseConfiguredEndpoints();
}

}

Answer

We also use auth-server.pfx not openiddict.pfx. But there is some confusion. Is that can cause the issue?

Can you connect my desktop again?

Answer

I remove the web site folder and I applied the password 00000000-0000-0000-0000-000000000000 but I got the same error.

PS C:\inetpub\wwwroot\PayosGate\PayosGateApi> dotnet dev-certs https -v -ep openiddict.pfx -p 00000000-0000-0000-0000-000000000000 [1] Listing certificates from CurrentUser\My [2] Found certificates: 1 certificate 1) 193B08B2C754BE796AFE64856FE863FD339EB078 - CN=localhost - Valid from 2024-05-15 00:07:34Z to 2025-05-15 00:07:34Z - IsHttpsDevelopmentCertificate: true - IsExportable: true [3] Checking certificates validity [4] Valid certificates: 1 certificate 1) 193B08B2C754BE796AFE64856FE863FD339EB078 - CN=localhost - Valid from 2024-05-15 00:07:34Z to 2025-05-15 00:07:34Z - IsHttpsDevelopmentCertificate: true - IsExportable: true [5] Invalid certificates: no certificates [6] Finished listing certificates. [1] Listing certificates from LocalMachine\My [2] Found certificates: no certificates [3] Checking certificates validity [4] Valid certificates: no certificates [5] Invalid certificates: no certificates [6] Finished listing certificates. [8] Filtered certificates: 1 certificate 1) 193B08B2C754BE796AFE64856FE863FD339EB078 - CN=localhost - Valid from 2024-05-15 00:07:34Z to 2025-05-15 00:07:34Z - IsHttpsDevelopmentCertificate: true - IsExportable: true [9] Excluded certificates: no certificates [14] Valid certificates: 1 certificate 1) 193B08B2C754BE796AFE64856FE863FD339EB078 - CN=localhost - Valid from 2024-05-15 00:07:34Z to 2025-05-15 00:07:34Z - IsHttpsDevelopmentCertificate: true - IsExportable: true [15] Selected certificate: 193B08B2C754BE796AFE64856FE863FD339EB078 - CN=localhost - Valid from 2024-05-15 00:07:34Z to 2025-05-15 00:07:34Z - IsHttpsDevelopmentCertificate: true - IsExportable: true [23] Saving certificate '193B08B2C754BE796AFE64856FE863FD339EB078 - CN=localhost - Valid from 2024-05-15 00:07:34Z to 2025-05-15 00:07:34Z - IsHttpsDevelopmentCertificate: true - IsExportable: true' to openiddict.pfx with private key. [27] Writing the certificate to: openiddict.pfx. A valid HTTPS certificate is already present. The certificate was exported to C:\inetpub\wwwroot\PayosGate\PayosGateApi\openiddict.pfx PS C:\inetpub\wwwroot\PayosGate\PayosGateApi> dotnet .\PaymentManagement.hTTPAPI.HOST.DLL [13:55:57 INF] Starting PaymentManagement.HttpApi.Host. PS C:\inetpub\wwwroot\PayosGate\PayosGateApi>

Answer
 dotnet dev-certs https -v -ep openiddict.pfx -p 00000000-0000-0000-0000-000000000000
[1] Listing certificates from CurrentUser\My
[2] Found certificates: 1 certificate
    1) 193B08B2C754BE796AFE64856FE863FD339EB078 - CN=localhost - Valid from 2024-05-15 00:07:34Z to 2025-05-15 00:07:34Z - IsHttpsDevelopmentCertificate: true - IsExportable: true
[3] Checking certificates validity
[4] Valid certificates: 1 certificate
    1) 193B08B2C754BE796AFE64856FE863FD339EB078 - CN=localhost - Valid from 2024-05-15 00:07:34Z to 2025-05-15 00:07:34Z - IsHttpsDevelopmentCertificate: true - IsExportable: true
[5] Invalid certificates: no certificates
[6] Finished listing certificates.
[1] Listing certificates from LocalMachine\My
[2] Found certificates: 1 certificate
    1) 193B08B2C754BE796AFE64856FE863FD339EB078 - CN=localhost - Valid from 2024-05-15 00:07:34Z to 2025-05-15 00:07:34Z - IsHttpsDevelopmentCertificate: true - IsExportable: true
[3] Checking certificates validity
[4] Valid certificates: 1 certificate
    1) 193B08B2C754BE796AFE64856FE863FD339EB078 - CN=localhost - Valid from 2024-05-15 00:07:34Z to 2025-05-15 00:07:34Z - IsHttpsDevelopmentCertificate: true - IsExportable: true
[5] Invalid certificates: no certificates
[6] Finished listing certificates.
[8] Filtered certificates: 2 certificates
    1) 193B08B2C754BE796AFE64856FE863FD339EB078 - CN=localhost - Valid from 2024-05-15 00:07:34Z to 2025-05-15 00:07:34Z - IsHttpsDevelopmentCertificate: true - IsExportable: true
    2) 193B08B2C754BE796AFE64856FE863FD339EB078 - CN=localhost - Valid from 2024-05-15 00:07:34Z to 2025-05-15 00:07:34Z - IsHttpsDevelopmentCertificate: true - IsExportable: true
[9] Excluded certificates: no certificates
[14] Valid certificates: 2 certificates
    1) 193B08B2C754BE796AFE64856FE863FD339EB078 - CN=localhost - Valid from 2024-05-15 00:07:34Z to 2025-05-15 00:07:34Z - IsHttpsDevelopmentCertificate: true - IsExportable: true
    2) 193B08B2C754BE796AFE64856FE863FD339EB078 - CN=localhost - Valid from 2024-05-15 00:07:34Z to 2025-05-15 00:07:34Z - IsHttpsDevelopmentCertificate: true - IsExportable: true
[15] Selected certificate: 193B08B2C754BE796AFE64856FE863FD339EB078 - CN=localhost - Valid from 2024-05-15 00:07:34Z to 2025-05-15 00:07:34Z - IsHttpsDevelopmentCertificate: true - IsExportable: true
[23] Saving certificate '193B08B2C754BE796AFE64856FE863FD339EB078 - CN=localhost - Valid from 2024-05-15 00:07:34Z to 2025-05-15 00:07:34Z - IsHttpsDevelopmentCertificate: true - IsExportable: true' to openiddict.pfx with private key.
[27] Writing the certificate to: openiddict.pfx.
A valid HTTPS certificate is already present.
The certificate was exported to C:\inetpub\wwwroot\PayosGate\PayosGateApi\openiddict.pfx
PS C:\inetpub\wwwroot\PayosGate\PayosGateApi> dotnet .\PaymentManagement.hTTPAPI.HOST.DLL
[12:44:30 INF] Starting PaymentManagement.HttpApi.Host.
[12:44:31 FTL] Host terminated unexpectedly!
Volo.Abp.AbpInitializationException: An error occurred during ConfigureServicesAsync phase of the module Volo.Abp.OpenIddict.AbpOpenIddictAspNetCoreModule, Volo.Abp.OpenIddict.AspNetCore, Version=8.3.0.0, Culture=neutral, PublicKeyToken=null. See the inner exception for details.
 ---> System.Security.Cryptography.CryptographicException: The specified network password is not correct.
   at System.Security.Cryptography.X509Certificates.CertificatePal.FilterPFXStore(ReadOnlySpan`1 rawData, SafePasswordHandle password, PfxCertStoreFlags pfxCertStoreFlags)
   at System.Security.Cryptography.X509Certificates.CertificatePal.FromBlobOrFile(ReadOnlySpan`1 rawData, String fileName, SafePasswordHandle password, X509KeyStorageFlags keyStorageFlags)
   at System.Security.Cryptography.X509Certificates.X509Certificate..ctor(String fileName, String password, X509KeyStorageFlags keyStorageFlags)
   at Microsoft.Extensions.DependencyInjection.OpenIddictServerBuilderExtensions.AddProductionEncryptionAndSigningCertificate(OpenIddictServerBuilder builder, String fileName, String passPhrase)
   at PaymentManagement.PaymentManagementApplicationContractsModule.<>c.<PreConfigureServices>b__0_2(OpenIddictServerBuilder serverBuilder) in C:\work\PayosGate\PaymentManagement\src\PaymentManagement.Application.Contracts\PaymentManagementApplicationContractsModule.cs:line 67
   at Volo.Abp.Options.PreConfigureActionList`1.Configure(TOptions options)
   at Microsoft.Extensions.DependencyInjection.ServiceCollectionPreConfigureExtensions.ExecutePreConfiguredActions[TOptions](IServiceCollection services, TOptions options)
   at Volo.Abp.OpenIddict.AbpOpenIddictAspNetCoreModule.&lt;&gt;c__DisplayClass1_0.&lt;AddOpenIddictServer&gt;b__0(OpenIddictServerBuilder builder)
   at Microsoft.Extensions.DependencyInjection.OpenIddictServerExtensions.AddServer(OpenIddictBuilder builder, Action`1 configuration)
   at Volo.Abp.OpenIddict.AbpOpenIddictAspNetCoreModule.AddOpenIddictServer(IServiceCollection services)
   at Volo.Abp.OpenIddict.AbpOpenIddictAspNetCoreModule.ConfigureServices(ServiceConfigurationContext context)
   at Volo.Abp.Modularity.AbpModule.ConfigureServicesAsync(ServiceConfigurationContext context)
   at Volo.Abp.AbpApplicationBase.ConfigureServicesAsync()
   --- End of inner exception stack trace ---
   at Volo.Abp.AbpApplicationBase.ConfigureServicesAsync()
   at Volo.Abp.AbpApplicationFactory.CreateAsync[TStartupModule](IServiceCollection services, Action`1 optionsAction)
   at Microsoft.Extensions.DependencyInjection.ServiceCollectionApplicationExtensions.AddApplicationAsync[TStartupModule](IServiceCollection services, Action`1 optionsAction)
   at Microsoft.Extensions.DependencyInjection.WebApplicationBuilderExtensions.AddApplicationAsync[TStartupModule](WebApplicationBuilder builder, Action`1 optionsAction)
   at PaymentManagement.Program.Main(String[] args) in C:\work\PayosGate\PaymentManagement\src\PaymentManagement.HttpApi.Host\Program.cs:line 36
PS C:\inetpub\wwwroot\PayosGate\PayosGateApi>


Showing 1 to 10 of 17 entries
Made with ❤️ on ABP v9.1.0-preview. Updated on November 20, 2024, 13:06