Skip to main content
0 votes
1 answer
270 views

I was recently in a technical discussion with a senior developer and was asked: What is the difference between RequestDelegate and Middleware in ASP.NET Core? I have already visited the following ...
phougatv's user avatar
  • 1,062
0 votes
1 answer
179 views

I am trying to implement a custom middleware to globally handle exceptions in my ASP.NET Core Web API project. My .NET Core version is 9.0. I created a custom class by extending from IMiddleware. My ...
Prabir Choudhury's user avatar
0 votes
1 answer
217 views

We have a Durable Function with multiple orchestrators and activities. We would like to use a middleware as global exception handler instead of handling it in every orchestrator/activity. We can catch ...
mburm's user avatar
  • 1,525
0 votes
1 answer
491 views

In ASP .NET Core app want to make one of my controllers sessionless. So I do the following: app.UseWhen( context => context.GetRouteValue("controller") is not "SomeValue", app =&...
Slepoyi's user avatar
  • 453
0 votes
1 answer
697 views

I needed a custom file provider, and to access a request's HttpContext, I found a solution using IHttpContextAccessor: app.UseWhen(ctx => ctx.Request.Path.StartsWithSegments("/res", ...
Asons's user avatar
  • 87.7k
0 votes
1 answer
206 views

I need to allow for individual hosts to have their own folder serving static files. Started out doing like this: var hosts = cfg.GetSection("AppSettings:AvailableHosts").Get<string[]>()...
Asons's user avatar
  • 87.7k
2 votes
1 answer
138 views

Whenever I send a POST request to my server from a frontend webpage I've made, the DevTools console throws the error below: Access to fetch at 'http://127.0.0.1:5000/CreateBooking' from origin 'http:/...
Bansdns's user avatar
  • 25
1 vote
1 answer
173 views

I use the following to create an instance of a class for storing user information during the request: services.AddScoped<IUserSettings, UserSettings>(); Then I use middleware to set the values ...
mtl's user avatar
  • 43
0 votes
1 answer
113 views

I am using semaphore to handle one request at a time and enqueue other request and process in sequence. But when I run the code it run first request and drop other request. What I am doing wrong here?...
Alamzaib Farooq's user avatar
0 votes
1 answer
105 views

I want to read the Body of incoming requests with the help of my HttpRequestTelemetryInitializer class. Although my GetRequestHeader method works successfully, I get the following error on the var ...
Mehmet Serkan Ekinci's user avatar
0 votes
0 answers
77 views

I am trying to configure a global error handler for my web app. Configuration In the Startup.cs Configure method: if (env.IsDevelopment()) { app.UseDeveloperExceptionPage(); } else { app....
Ryan's user avatar
  • 662
0 votes
1 answer
120 views

In my .NET 7 web site, I've set up the processing pipeline to use UseStatusCodePagesWithReExecute but with a registered middleware in the pipeline returns 404, it correctly returns the 404.cshtml page,...
Terry's user avatar
  • 2,028
-1 votes
1 answer
65 views

I added a new property in a entity class. I didn't create migration. After that, I tried to use UseExceptionHandler middleware. It successfully triggered error action method but the view didn't appear....
Onur's user avatar
  • 1
0 votes
1 answer
1k views

I'm working on an ASP.NET Core Web API project and I am trying to implement some global functionalities using middleware. Specifically, I want to handle the following: Global exception handling: ...
Abdullah Sameer's user avatar
0 votes
1 answer
577 views

I have some middleware which sets a response status code, content type and content (with SendFileAsync) yet the log file contains a debug message from Microsoft.AspNetCore.Hosting.Diagnostics saying &...
Ian Horwill's user avatar
  • 3,027

15 30 50 per page
1
2 3 4 5
28