python (65.2k questions)
javascript (44.3k questions)
reactjs (22.7k questions)
java (20.8k questions)
c# (17.4k questions)
html (16.3k questions)
r (13.7k questions)
android (13k questions)
How to create ASP.Net Core Cookie on first request
We've ported a large web application to .Net 6. We have everything working, but we're working on cleaning up the code.
In .Net Framework, we created a session cookie on the first request in the sessio...
Vidar Langberget
Votes: 0
Answers: 0
Middleware works in program.cs, but not when moved to it's own class
I'm using asp.net core 6, in my program.cs I have the following middleware, which is used to redirect the user when the statuscode is 404.
app.Use(async (ctx, next) =>
{
await next();
if (...
Niels
Votes: 0
Answers: 1
Is it possible to protect HealthCheck endpoints other than Authorization in ASP.NET Core?
The case I'm trying to handle is protecting the health endpoint generated by using IEndpointRouteBuilder.MapHealthChecks not via authorization, but by some other mechanism.
My first thought was to add...
SpiritBob
Votes: 0
Answers: 1
The input does not contain any JSON tokens
I am getting below error due to my middleware
The input does not contain any JSON tokens. Expected the input to start with a valid JSON token, when isFinalBlock is true. Path: $ | LineNumber: 0 | Byt...
Saurabh
Votes: 0
Answers: 1