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
8
votes
2 answers

How to stop a self hosted Kestrel application?

I have the canonical code to self host an asp.net mvc application, inside a task: Task hostingtask = Task.Factory.StartNew(() => { Console.WriteLine("hosting ffoqsi"); IWebHost host = new…
citykid
  • 9,916
  • 10
  • 55
  • 91
8
votes
2 answers

Is it possible to run ASP.NET 5 site directly on Kestrel in Azure WebApps?

I have checked that in the web response the server is IIS when I deploy ASP.NET5 to azure web app, so I guess the IIS platform handler is used to redirect it to Kestrel. So I am wondering if it is possible to run directly on Kestrel, and what…
Ilya Chernomordik
  • 27,817
  • 27
  • 121
  • 207
7
votes
1 answer

Has anyone deployed .NET Core in a microservice with gRPC server in docker using ubuntu 18.04

I have two .net core microservices(PatientService and AppointmentService) with normal web APIs and gRPC service. I am using gRPC for inter service communication instead of using HTTP calls. Appointment service depends upon patient service for data,…
7
votes
2 answers

Blazor Windows Authentication on Kestrel works locally only? An anonymous request was received in between authentication handshake requests

I created a Blazor application with Windows authentication and hosting with Kestrel/Negotiate following the steps.…
ca9163d9
  • 27,283
  • 64
  • 210
  • 413
7
votes
2 answers

Reload ASP.NET Core app when dll files change (bin deploy)

Environment: ASP.NET Core 2.1, Ubuntu. In old style ASP.NET, when I did a bin deploy (uploaded some dll files for example), the webapp would detect that and reload itself - very useful. With Core it doesn't do that. I need to stop and restart the…
lonix
  • 14,255
  • 23
  • 85
  • 176
7
votes
3 answers

How to proper setup HTTPS for NET Core 2.1 using a store certificate

I have generated a certificate using powershell using this suggestion found at Stackoverflow: New-SelfSignedCertificate -Subject "CN=Test Code Signing" -Type CodeSigningCert -KeySpec "Signature" -KeyUsage "DigitalSignature" -FriendlyName "Test Code…
Junior Mayhé
  • 16,144
  • 26
  • 115
  • 161
7
votes
3 answers

To which process should I attach Visual Studio Debugger to debug a Kestrel application?

I am bringing up command line and running my app using dotnet run command. This starts Kestrel and brings up my application. How should I go with identify to which process to attach debugger so I can debug the website that Kestrel now hosts? I…
nikib3ro
  • 20,366
  • 24
  • 120
  • 181
7
votes
1 answer

Can't cancel task in Asp.net core Action

I am trying to cancel Task running in Asp.net Core Action. For that I am using this github sample. I can cancel task if running service in console, but if I run under IIS (or IIS Express) task is not canceling. I saw similar issue in other question.…
7
votes
1 answer

AspNetCore (Kestrel) request timed out

I am having the following setup: a web api running in a couple of linux containers (built on aspnetcore 2.0.5) behind a application loadbalancer (AWS) A client that is making request to this api using HttpClient. The client is running the calls on…
mslliviu
  • 1,098
  • 2
  • 12
  • 30
7
votes
3 answers

How to stop a MassTransit bus in an ASP.NET Core server?

I am studying MassTransit and ASP.NET Core, dependancy injection and successfully implemented something that works. I plan to use the Kestrel web server. So I had to configure my ASP.NET core project this way in the Startup.cs. public void…
Larry
  • 17,605
  • 9
  • 77
  • 106
7
votes
2 answers

Launch external process (.exe) from asp.net core app

I have the following [HttpPost] public IActionResult LaunchExternalProcess() { Process.Start("C:\\Windows\\System32\\calc.exe"); return Ok(); } And this works perfectly fine on my local machine, but when deployed onto IIS 10 (windows 2016)…
7
votes
4 answers

Apparently Random Error: "Antiforgery token validation failed. The antiforgery cookie token and request token do not match."

Background I have a relatively new ASP.NET Core 2 site. It's running on just one server (Windows Server 2012 R2, IIS 8.5), and I only restart the site once every few days when I upload an update. About once a day, a user's request fails due to…
user1325179
  • 1,535
  • 2
  • 19
  • 29
7
votes
3 answers

How can I configure endpoints in Kestrel?

I'm learning how to work with in ASP.NET Core 2 and I've come across a rather annoying problem. Whenever I run my application, the Kestrel server ignores my endpoint configuration and instead starts listening on a random port. Needless to say, this…
Exevan
  • 335
  • 1
  • 3
  • 24
7
votes
1 answer

ASP.NET core 2.0 standalone: passing listening url via command line

I am writing my first ASP.NET Core 2.0 web REST API application by following this tutorial. However my specific question is about the code you get in the Program.cs file when you create a standard ASP.NET Core Web Application in VS2017, it is the…
Alex
  • 928
  • 1
  • 16
  • 30
7
votes
1 answer

HttpClient does not send client certificate on Windows using .NET Core

I am unable to get the HttpClient class to send a client certificate using .NET Core on Windows. Here is the code I am using: X509Certificate2 certificate = new X509Certificate2(@"C:\Repos\selly\client1.pfx", "password"); HttpClientHandler handler =…
Alex Stevens
  • 106
  • 2
  • 5