Questions tagged [kestrel-http-server]

Kestrel is a HTTP server that is built-in to ASP.NET Core.

Kestrel is an open-source web server based on libuv and developed by Microsoft. The project home is on GitHub.

822 questions
5
votes
1 answer

ASP.net Core Web App not receiving requests when running in Docker container

I'd like to dockerize a simple ASP.net Core Web App which hosts a REST API using Kestrel. As you can see in the console output, the app works perfectly fine when I run it on my local machine. I see the URLs which it's listening on as well as the…
5
votes
4 answers

.NET Core 3.0 IHostedService access web server URL - scheme, host, port etc

The issue that I have is simple. I want to access the server URL in my IHostedService. I cannot find a way to do it. There isn't any request there so I cannot use the IHttpContextAccessor. IServer features property doesn't have any addresses and I…
ppavlov
  • 378
  • 5
  • 14
5
votes
0 answers

How to set the request timeout in .NET Core Kestrel Web API?

I've got a .NET Core 2.2 Web API project running behind a load balancer. The load balancer has a timeout set to 60 seconds. I'd like to set the timeout in my app at 55 seconds so I can clean things up and return a customized message to the caller. …
DanielEli
  • 3,393
  • 5
  • 29
  • 36
5
votes
0 answers

Microsoft.AspNetCore.Connections.ConnectionResetException

One customer keeps getting this error and I think it is due to a slow connection/latency problem but wondering if anyone else has run into this. Microsoft.AspNetCore.Server.Kestrel|Connection id “0HLP5AO39QCJI”, Request id “0HLP5AO39QCJI:00000017”:…
chobo2
  • 83,322
  • 195
  • 530
  • 832
5
votes
2 answers

Kestrel throwing "Invalid Host header" error while serving traffic

We have recently migrated an ASP.NET MVC 5 application to ASP.NET Core 2.2. Everything seems to be working fine, however we are getting the following exception on a fairly regular basis (about three times a second, more on that in a…
Tombatron
  • 1,567
  • 1
  • 13
  • 27
5
votes
7 answers

Access DB Context in program.cs

Is there a way to access the DB context of a .NET Core application in the program.cs file? I am basically looking to configure Kestrel with specific options that are stored in the database so I would need access to the database context. I am…
Tachyon
  • 2,171
  • 3
  • 22
  • 46
5
votes
3 answers

Asp.net Core RequestSizeLimit still executes action

I am using ASP.net Core 2.0 with MVC. I have a controller action that I want to limit the request size to 1MB. I added the RequestSizeLimit attribute like so: [HttpPost] [Authorize] [RequestSizeLimit(1_000_000)] public async…
spectacularbob
  • 3,080
  • 2
  • 20
  • 41
5
votes
4 answers

Problems running/configure self hosted console application (ASP.net core 2.1, Kestrel) with public certificate on a windows webserver

I have developed various webservices in the past (VB ASP.net web-api applications) with https for production. I have done the development with http and then setup https on the production servers. To setup a port on the production server for https…
5
votes
0 answers

Kestrel modify incoming http headers

I have an IP camera that I'm trying to receive events from. For example, if it detects motion in a specific part of the frame, I want to know about it and get the images captured with the event. The problem is that it uses HTTP/1.0 POST to send…
Jaron
  • 133
  • 6
5
votes
0 answers

Exposing multiple ports using Kestrel and IIS

We are building services on the .NET Core stack. Currently we are hosting these using Kestrel behind the IIS reverse proxy. These services have some business functionality, and some admin/config functionality. One idea we are playing with is to…
5
votes
2 answers

ASP.net Core Application Hanging on Requests

We have a ASP.net core 2.0 application running in .Net Framework V4.7.1 hosted in IIS using Kestrel. The application works fine on most machines, however on when running on my machine it is really slow. I have stripped down the application to a…
user1755802
  • 81
  • 1
  • 6
5
votes
1 answer

Kestrel + IIS Reverse Proxy RequestAborted Not Triggered

We have an ASP.NET Core 2.x Application that implements custom middleware that acts as a proxy in front of another (Java based) server/application. It is common for the clients of this application/middleware to frequently abort/cancel their request…
mikeo
  • 1,045
  • 13
  • 17
5
votes
1 answer

HttpClient calls slow from Kestrel + IIS

I have a simple asp.net core 2.0 WebApi app running in Kestrel behind an IIS reverse proxy. The single route is pretty simple, it just makes a http request: using (HttpClient client = new HttpClient()) { client.BaseAddress = new…
5
votes
0 answers

Why does custom urls work with UseConfiguration and not with ConfigureAppConfiguration?

I was struggling to use custom urls for Kestrel and I finally found a combination of settings and builders that work but I'm really confused why does the following work: var configuration = new ConfigurationBuilder() …
t3chb0t
  • 16,340
  • 13
  • 78
  • 118
5
votes
0 answers

Using Kestrel with named pipes?

I was wondering if anyone knew how to get Kestrel to listen on named pipes such that the only modifications to an already existing program that is using HTTPClient should be changing the connection string from http://localhost to…