Quantcast
Channel: ASP.NET Core
Viewing all articles
Browse latest Browse all 9386

Upgrade from .Net Core 2.2 to 3.0 gives Internal Server Error for SignInManager

$
0
0

Hello,

    So I upgraded from my MVC from .NetCore  2.2 to 3.0.  After making the required changes to the Startup.cs and Program.cs, then all the models and controllers.  I ran a build and had no errors.  I then went to debug with Microsoft Edge and ran into a huge error that I have not been able to figure out what I am missing.  There error I am getting is 

InvalidOperationException: No service for type 'Microsoft.AspNetCore.Identity.SignInManager`1[Microsoft.AspNetCore.Identity.IdentityUser]' has been registered.

In following everything from the migration page (https://docs.microsoft.com/en-us/aspnet/core/migration/22-to-30?view=aspnetcore-3.1&tabs=visual-studio#razor-pages) I added the service.AddRazorPages() after services.AddControllersWithViews(), and I have the app.UseRouting before the app.UseAuthentication, which is before the app.UseEdnpoints.  In the endpoints I also have the MapRazorPages setup.  I have tried adding the Microsoft.AspNetCore.Identity.UI package to the project but that also did not seem to help.  Before I even began to make changes I ran the project and it worked perfectly fine.  

The only changes I can see that affected this were the required changes.  Replacing services.AddDefaultIdentity with services.AddIdentityCore, and what I mentioned above.   

Any thoughts on what I may have missed in the upgrade?


Viewing all articles
Browse latest Browse all 9386

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>