UserManager CheckPassword() rehash the password in .net core 3.1 and can’t sign in from asp.net MVC Project

I’m using asp.net Identity for signing in users in asp.net MVC Project and It’s working fine.
I’ve created new .net core 3.1 API project and used the Microsoft.Extensions.Identity.Core for checking usernames and passwords to generate tokens.

What is the problem ASP.Net Core Error CS1061

Severity Code Description Project File Line Suppression State
Error CS1061 ‘IServiceCollection’ does not contain a definition for
‘AddDefaultIdentity’ and no accessible extension method
‘AddDefaultIdentity’ accepting a first argument of type
‘IServiceCollection’ could be found (are you missing a using directive
or an assembly
reference?) WebHesab C:UsersDELLsourcereposWebHesabWebHesabStartup.cs 36 Active

Generate a secure double defined on range [0.0d – 1.0d] (both inclusive)

I need to know how to generate a secure double defined on range [0.0 – 1.0] both inclusive.
I generate two big ulong numbers with RNGCryptoServiceProvider class, make sure that the second number is greater or equals to the first number and then divide the first number by the second number and cast result to double. Ideally, numbers 0.0d and 1.0d should be included in this range, but they’re never included. It must be something with mantissa with double values. Do you know how to fix it?