ABP Framework version: v7.0.1
UI type: MVC
DB provider: EF Core
Tiered (MVC) or Identity Server Separated (Angular): no
Exception message and stack trace:
2023-03-28 22:56:29.436 -04:00 [FTL] RicksAppDev terminated unexpectedly!
Volo.Abp.AbpInitializationException: An error occurred during ConfigureServicesAsync phase of the module Volo.Abp.OpenIddict.AbpOpenIddictAspNetCoreModule, Volo.Abp.OpenIddict.AspNetCore, Version=7.1.0.0, Culture=neutral, PublicKeyToken=null. See the inner exception for details.
---> System.Security.Cryptography.CryptographicException: Access is denied.
at System.Security.Cryptography.X509Certificates.StorePal.FromSystemStore(String storeName, StoreLocation storeLocation, OpenFlags openFlags)
at System.Security.Cryptography.X509Certificates.X509Store.Open(OpenFlags flags)
at Microsoft.Extensions.DependencyInjection.OpenIddictServerBuilder.AddDevelopmentEncryptionCertificate(X500DistinguishedName subject)
at Microsoft.Extensions.DependencyInjection.OpenIddictServerBuilder.AddDevelopmentEncryptionCertificate()
at Volo.Abp.OpenIddict.AbpOpenIddictAspNetCoreModule.<>c__DisplayClass1_0.<AddOpenIddictServer>b__0(OpenIddictServerBuilder builder)
at Microsoft.Extensions.DependencyInjection.OpenIddictServerExtensions.AddServer(OpenIddictBuilder builder, Action1 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, Action1 optionsAction)
at Microsoft.Extensions.DependencyInjection.ServiceCollectionApplicationExtensions.AddApplicationAsync[TStartupModule](IServiceCollection services, Action1 optionsAction) at Microsoft.Extensions.DependencyInjection.WebApplicationBuilderExtensions.AddApplicationAsync[TStartupModule](WebApplicationBuilder builder, Action1 optionsAction)
at RicksAppDev.Program.Main(String[] args) in D:\RicksAppDev\RicksAppDev\Program.cs:line 42
Steps to reproduce the issue:"
Create a simple single layer ABP app using ABP SUITE app. Then publish to a shared windows hosting server with sql server 2019 server and the above settings.
The exception logged by ABP is included above. NOTE: I published a multi project ABP App on a work server and had an "authserver.pfx" file with invalid password issue. I generated a self-signed authserver.pfx file with the password in the code and the app started working. There is no way to generate or find the password the OpenIddict server is looking for in this single layer app. How can I configure this single layer app to work.
Things I checked: Will shared hosting server work with .net core 7? Yes. I created a simple .net core 7 app with database access and was able to publish the app, load the pages, save data, etc. I created a version 6.2 ABP multi project app and was able to serve up the app from a Shared Hosting Server without issue. I did have other issues when schema is not "dbo" Something is very different between the two authentication schemes
Thank you.
Check the docs before asking a question: https://docs.abp.io/en/commercial/latest/ Check the samples, to see the basic tasks: https://docs.abp.io/en/commercial/latest/samples/index The exact solution to your question may have been answered before, please use the search on the homepage.
If you're creating a bug/problem report, please include followings:
public City(Guid id, string ci_city = null)
{
Id = id;
Check.Length(ci_city, nameof(ci_city), CityConsts.ci_cityMaxLength, 0);
ci_city = ci_city; // THIS SHOULD BE this.ci_city=city;
}
** working code
// recommendation: USE "this" to disambiguate between local variables and parameters and member variables that happen to have the same identifier name
public City(Guid id, string ci_city = null)
{
Id = id;
Check.Length(ci_city, nameof(ci_city), CityConsts.ci_cityMaxLength, 0);
this.ci_city = ci_city; // THIS SHOULD BE this.ci_city=city;
}
**** recommendation: USE "this" to disambiguate between local variables and parameters and member variables that happen to have the same identifier name.****