Open Ayush2395 opened 9 months ago
I had/have the same issue trying to scaffold the Login page. I ended having to do the following to get the scaffold to apply:
Web.csproj
Once the item was scaffolded I reverted the changes with the following notes:
ApplicationDbContext
even though I selected one.Program.cs
of Web project that weren't required.In the end, I'm still receiving the following message when using the scaffolded page:
InvalidOperationException: Unable to resolve service for type 'Microsoft.AspNetCore.Identity.SignInManager-1[Microsoft.AspNetCore.Identity.IdentityUser]' while attempting to activate '<namespace>.Areas.Identity.Pages.Account.LoginModel'. Microsoft.Extensions.DependencyInjection.ActivatorUtilities.ThrowHelperUnableToResolveService(Type type, Type requiredBy)
InvalidOperationException: The exception handler configured on ExceptionHandlerOptions produced a 404 status response. This InvalidOperationException containing the original exception was thrown since this is often due to a misconfigured ExceptionHandlingPath. If the exception handler is expected to return 404 status responses then set AllowStatusCode404Response to true. Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddlewareImpl.HandleException(HttpContext context, ExceptionDispatchInfo edi)
Just made it work here.
1) Try to scaffold then you see this error;
2) Go to your Directory.Packages.props and check if your using version 8.0.2 for all EntityFrameworkCore packages.
This one was wrong =>
Can confirm it works better in 8.0.2.
Bug description In the previous version in .NET 7, I can easily scaffold the Identity UI for customizing the UI of Login, Register, etc., But in the current release for .NET 8, its not working, its giving the error, screenshot is attached down below:
Error screenshot:
I tried to remove the files and other stuffs to reduce the error, but still, I get error on the
AddWebService
Extension method, but it reduces the errors to one, because of this extension method, I changed the namespace too, but still that error is annoying me 😂.The error is only occurred in this .NET 8.
Please fix that my project is on hold because of that, or any idea how I can erase that error from this world 😂.