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
14
votes
0 answers

Using MapFallbackToController endpoint works locally with iis express & kestrel, uses the fallback instead of a higher priority route on IIS

After switching from .net core 2.2 to 3.0 and then 3.1 locally we switched to endpoint routing. I have the following routes : app.UseEndpoints(endpoints => { // Using this for asp.net core identity …
Ronan Thibaudau
  • 3,413
  • 3
  • 29
  • 78
14
votes
1 answer

Using Kestrel without ASP.NET core

I want to use Kestrel HTTP Server to do HTTP things unrelated to the ASP.NET abstraction. I don't want to install any of the ASP.NET packages just Kestrel and use Request/Response model to write a fast/performant HTTP application. In the old days…
Hristo Kolev
  • 1,486
  • 1
  • 16
  • 33
14
votes
1 answer

Why do I get a 404 trying to post a large file to a Core Web API

I am very new to file transfer between HttpClient and a Web API, so please excuse any ignorance and guesswork in my code. I have been trying to post a file created with System.IO.Compression.ZipFile to my web API now for about a day, and always I…
ProfK
  • 49,207
  • 121
  • 399
  • 775
13
votes
1 answer

Publish two different endpoints on Kestrel for two different endpoints on ASP.NET Core

I have a ASP.NET Core application that has two endpoints. One is the MVC and the other is the Grpc. I need that the kestrel publishs each endpoint on different sockets. Example: localhost:8888 (MVC) and localhost:8889 (Grpc). I know how to publish…
Douglas Ramos
  • 531
  • 1
  • 5
  • 10
13
votes
2 answers

ASP.NET Core include timestamp in all log entries

I have a ASP.NET Core 2.0 application with built-in console logging enabled. Here is the WebHost creation: var webHost = WebHost.CreateDefaultBuilder(args) .UseUrls("http://localhost:5002") .UseStartup() …
smn.tino
  • 2,272
  • 4
  • 32
  • 41
13
votes
1 answer

Kestrel webserver for Asp.Net Core - does it recycle / reload after some time

Simple noob question :-) I'm about to go into production with a small .NET core app host that's hosted in a droplet at digitalocean. I've always hosted websites using IIS, but I would like to move to linux distributions and use nginx as reverse…
dev1985
  • 171
  • 1
  • 8
13
votes
3 answers

Kestrel and ASP.NET Core MVC use custom base path

How can you mount your app on a different base path? For example, my controller's route is /api/keywords, but when running the web server I want the basepath to be /development, so my controller route would be /development/api/keywords. I would…
ryudice
  • 36,476
  • 32
  • 115
  • 163
12
votes
2 answers

Can't get client's real IP when using Nginx reverse proxy

Problem description: When I access Asp.net MVC Core 3.1 webpage that is supposed to return my remote client's ip address I instead get internal docker IP of Nginx container. I'm not sure if the problem is my code in asp.net core, the Nginx reverse…
12
votes
2 answers

Windows Authentication works on IIS but not Kestrel / Microsoft.AspNetCore.Authentication.Negotiate (not in Chrome, sometimes in Edge, always in IE)?

I created a new Blazor (Server-side) application with Windows Authentication and run it using IIS Express. It will display a message of "Hello Domain\User!" from the following razor component (...\BlazorApp1\BlazorApp1\Shared\LoginDisplay.razor) on…
ca9163d9
  • 27,283
  • 64
  • 210
  • 413
12
votes
7 answers

Kestrel unable to start

When specifying a port to bind to with .UseKestrel() I get the errors listed below.. but if I remove the kestrel options everything works normally if I check the API from my browser. I've tried binding to the port that my application defaults to…
Ping Pong
  • 139
  • 1
  • 1
  • 4
12
votes
3 answers

Visual Studio keeps adding IIS Express back into my launchsettings.json

I am trying to remove the IIS Express profile from my .NET Core launch settings but every time i repoen the solution, Visual Studio adds it back in again. For example, in a new project my launch settings looks like this { "iisSettings": { …
12
votes
6 answers

Kestrel error: address already in use (dotnet core)

Summary: it works as dotnet run, but it doesn't work as dotnet myappname.dll. My linux skills are limited, but I am trying to go by the book so I don't mix things up (following this tutorial from Scott Hanselman): $ cd /home/myusername/dotnettest $…
Xavier Peña
  • 7,399
  • 9
  • 57
  • 99
12
votes
3 answers

Digest authentication in ASP.NET Core / Kestrel

Is it possible to use digest authentication in ASP.NET Core / Kestrel? If it is, how do I enable and use it? I know that basic authentication is not and will not be implemented because it's considered insecure and slow, but I can't find anything at…
Albireo
  • 10,977
  • 13
  • 62
  • 96
12
votes
4 answers

Require SSL Client Certificate only for specific routes or controllers

I have an ASP.NET MVC Core project using Kestrel as the server. It is both serving up user content (asp.net mvc) and hosts web API controllers that agents (software) communicate with. I have enabled HTTPS and client certificate support. The issue is…
Paul W.
  • 299
  • 1
  • 5
  • 15
11
votes
1 answer

Configuring Kestrel Server Options in .NET 6 Startup

I am migrating a WebApi from .net5 to .net6. It's going fairly well, but have run into the problem of how to configure Kestrel during startup. The following code is from the Main method of the Program.cs file: var builder =…
brando
  • 8,215
  • 8
  • 40
  • 59