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.83k stars 3.42k forks source link

Better path finding for tempkey.rsa #12120

Open enisn opened 2 years ago

enisn commented 2 years ago

Following code searches in the C:\Windows\system32\tempkey.jwk path in desktop apps like UWP and most probably MAUI Blazor.

https://github.com/abpframework/abp/blob/e3e1779de6df5d26f01cdc8e99ac9cbcb3d24d3c/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/AbpIdentityServerBuilderExtensions.cs#L76

We should get executing dll directory or make it configurable.


Originally posted here: https://support.abp.io/QA/Questions/2797/AbpInitializationException

kfrancis commented 2 years ago

Can work around using Directory.SetCurrentDirectory(System.AppDomain.CurrentDomain.BaseDirectory); but it seems like something that should be configurable or have a better default.

Something like what's done here for config: https://github.com/abpframework/abp/blob/e3e1779de6df5d26f01cdc8e99ac9cbcb3d24d3c/framework/src/Volo.Abp.Core/Microsoft/Extensions/Configuration/ConfigurationHelper.cs#L14-L17