mspnp / AzureNamingTool

The Azure Naming Tool is a .NET 8 Blazor application, with a RESTful API. The UI consists of several pages to allow the configuration and generation of Azure Resource names. The API provides a programmatic interface for the functionality.
https://aka.ms/azurenamingtool
MIT License
307 stars 601 forks source link

Administration not possible #84

Closed alphasteff closed 4 months ago

alphasteff commented 4 months ago

Tool version 4.0.1, but since a couple of versions the problem exists

Describe the bug I have not been able to log in as admin for several versions. The password seems to work. As soon as I have logged in, I get the menu entry Admin Log. But under Admin, I still only see the option to enter the password, the configuration options are not displayed.

I see an error in the logs after login: INFORMATION | Global Admin logged in. ERROR | There was a problem verifying connectivty. Error: String '' was not recognized as a valid Boolean.

To Reproduce Steps to reproduce the behavior:

  1. Go to 'Admin'
  2. Enter 'Global Admin Password' and 'Login'
  3. Click on 'Admin Log'

Expected behavior I would like to see the administrative settings again.

Screenshots image

In the picture you can see that I am logged in (Logout, Admin Log) but still only the input for the password is displayed.

Installation Method Azure Web App Using GitHub Action

Additional context If it is too time-consuming to solve the problem, I would be interested to know whether resetting the configuration would help, this is only in my personal lab. Maybe you can add this to the documentation, then I can try it.

BryanSoltis commented 4 months ago

Hello @alphasteff,

Thank you for your feedback. I have seen this type of image in the past when there is some sort of issue accessing the password in the configuration file. If you want to try to manually reset it, you can:

This process will reset the password and should allow you to continue.

As for a "full reset" process, there isn't an "official" way, other than the Configuration/General Configuration / Global Configuration/ Reset the Global Configuration option. This option will reset your configuration top the "default" settings, however, this does not update your Admin Password/API Keys.

image

If you wanted to COMPLETELY reset, you can delet3e all of the JSON files int he /settings folder. When the site is accessed, it will copy all of the contents of the /repository folder to the /settings folder, thus resetting all configuration. This will also reset the passwords/API keys.

Hope this helps!

-Bryan

alphasteff commented 4 months ago

Hi @BryanSoltis

Thank you very much for your detailed answer. The Azure Naming Tool is now working again.

Deleting the AdminPassword did not help. In the end, I had to delete the JSON files in the /settings folder. This solved the problem for me.

Many thanks for the help Greetings Stefan