'_userManager.CreateAsync not working. No exception returned and finishes as HTTP error 500

I implemented Identity on a ASP .Net Core 5 Web Application. I already created and ran the proper database migrations. However, when I run the application and I try to register a new account

enter image description here

enter image description here

It nevers finishes the CreateAsync and at the end it's shown a blank page showing Http Error 500



Solution 1:[1]

Looks like after a lot of fails, I finally found a solution.

You need to change the Connection String in appsettings.json

From

"DefaultConnection": "Server=localhost,1433;Initial Catalog=DatabaseName;Persist Security Info=False;User ID=sa;Password=YourPassword;",

To

"DefaultConnection": "Server=XXX.XXX.XXX.XXX,1433;Initial Catalog=DatabaseName;Persist Security Info=False;User ID=sa;Password=YourPassword;",

I also applied the solution mentioned in this link:

https://tutexchange.com/how-to-customise-asp-net-core-identity/

After doing both parts, I am now able to register an user account.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Amir Dora.