DI for authentication service in standalone Server.Web project? #9570
Replies: 2 comments 7 replies
-
Hi there, Here are the most common setup options:
If you don’t need pre-rendering, you can simply publish However, if you do need pre-rendering, deploying the integrated Due to these considerations, using a standalone I’m currently preparing a PR to address this issue and will include more details in the PR description. |
Beta Was this translation helpful? Give feedback.
-
@MarTechView Thanks for contacting us. |
Beta Was this translation helpful? Give feedback.
-
Hello, first off, this is an amazing project. I've been working on learning Blazor and this project has been an incredible resource in helping me on my journey. Thank you for sharing it!
Next, where is Authentication service setup for Server.Web in the boilerplate solution when the API is setup to run standalone, versus integrated?
In the Program.Middleware.cs in the Server.Web project, it has "app.UseAuthentication();" but I don't see where "AddAuthentication" or the equivalent is added via one of the projects.
I don't know if it is just me but I get the following when trying to run the Server.Web project:
Message=Unable to resolve service for type 'Microsoft.AspNetCore.Authentication.IAuthenticationSchemeProvider' while attempting to activate 'Microsoft.AspNetCore.Authentication.AuthenticationMiddleware'.
Should "app.UseCors();" also be present in the Program.Middleware.cs in the Server.Web project with standalone API?
Beta Was this translation helpful? Give feedback.
All reactions