skip to Main Content

ASP.NET Core: No authentication handler registered for scheme 'Bearer' despite calling AddBearerToken in program.cs

I have program.cs: using System.Reflection; using HalfbitZadanie.Extensions; using InnoProducts.Models; using InnoProducts.Repositories; using Microsoft.AspNetCore.Identity; using Microsoft.EntityFrameworkCore; var builder = WebApplication.CreateBuilder(args); // Add services to the container. builder.Services.AddControllers(); // Learn more about configuring Swagger/OpenAPI at https://aka.ms/aspnetcore/swashbuckle builder.Services.AddEndpointsApiExplorer(); builder.Services.AddSwaggerGen(); builder.Services.AddAuthorization(); builder.Services.AddAuthentication(options => {…

VIEW QUESTION

Asp.net – Access different form element value

In an action, can I access different form element value? For example I have 3 forms, first form contains common element. <form id="commonSurname"> <input type="text" id="surname" name="surname" /> </form> <form id="person1" asp-action="getPerson1" method="post"> <input type="text" id="name1" name="name1" /> <input type="submit"…

VIEW QUESTION
Back To Top
Search