Abdulmajeed Alshari

Abdulmajeed Alshari

  • 1.7k
  • 202
  • 17.6k

UserManager and SignInManager not run correctly

Jul 8 2020 4:09 PM
my asp project run well when try to debug my asp project and connect it with its database , its Database is placed on godaddy Server .
  1. //In this case I connect my project with external database on Godaddy Hosting  
  2. var result = await SignInManager.PasswordSignInAsync(model.Email, model.Password, model.RememberMe, shouldLockout: false);      
  3. //Here it is return success as a result   
  4. var userID = UserManager.FindByName(model.userName)?.Id;  
  5. //Here it is return this '882ffec2-a71d-49d2-986d-4c7ee472dd8a' as UserId   
 
but not run well when try to connect my asp project with  local database that placed on SQL Server in my muchine, 
  1. //In this case I connect my project with internal database on local SQL Server on the same computer .     
  2. var result = await SignInManager.PasswordSignInAsync(model.Email, model.Password, model.RememberMe, shouldLockout: false);        
  3. //Here it is return Failure as a result     
  4. var userID = UserManager.FindByName(model.userName)?.Id;    
  5. //Here it is return null value as UserId     
Note One - Two Databases has the same schama and Data because I Create the local Database from script of the external database. I Generate the Script of Schama and Data.
too, I check that browase the data of these databases are the same togerther .
 
Note Two - I am using Database First Approach
I am confused please help.

Brought to you by: JavaScript SDK for Bold BI dashboard and analytics embedding. Free trial.

Answers (1)