
Here I am applying the asp.net core identity for user signup


Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Cr BhargaviPosted Aug 13, 2023, 8:13 AM
Check Initialization of
_SigninManagerand_autoserviceObjects: Ensure that both_SigninManagerand_autoserviceobjects are properly initialized before using them. Make sure that you have the necessary references and configurations set up for both objects.Praveen PaswanPosted Aug 11, 2023, 5:41 AM
Create a ConnectionString in appsetting.json file under the
"AllowedHosts": "*",
"ConnectionStrings": {;User Id=sa;Password=*****;Database=;TrustServerCertificate=True;"
"ConStr": "Data Source=
}
Add Service in "Program.cs" class (Asp,Net Core 6.0 and Above):
builder.Services.AddDbContext<your DbContext>(options => options.UseSqlServer(builder.Configuration.GetConnectionString("ConStr")));
Add Service in "Startup.cs" class(Asp.Net Core 5.0) :
In ConfigureServices Method
services.AddDbContext<your DbContext>(options => options.UseSqlServer(Configuration.GetConnectionString("ConStr")))
Tahir AnsariPosted Aug 9, 2023, 12:50 PM
Exception clearly saying your connection was not initialized.
Please check your connectionstring in appsettings.json file also check program.cs file
Mohammad HussainPosted Aug 9, 2023, 12:49 PM
It looks like you're encountering an issue related to connection property initialization in ASP.NET. The error you mentioned, "Invalid operation. Connection property is not initialized," suggests that there might be an issue with the way you're using the
_SigninManagerand_autoserviceobjects.Check Initialization of
_SigninManagerand_autoserviceObjects: Ensure that both_SigninManagerand_autoserviceobjects are properly initialized before using them. Make sure that you have the necessary references and configurations set up for both objects.It's generally recommended to use
awaitinstead of.Resultto avoid blocking. If_SigninManager.PasswordSignInAsyncis an asynchronous method, make sure you are usingawaitcorrectly and that the containing method is also marked asasync.