Questions tagged [kestrel-http-server]

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

Filter by
Sorted by
Tagged with
0 votes
0 answers
23 views

How to deploy asp.net core web app hosted by Kestrel that should support https with self-signed certificate

I am deploying an asp.net core 3.1 web app. The tech stack is: Runs as docker container in a linux machine; Hosted by asp.net core out of box Kestrel server; Uses a self-signed certificate in testing ...
0 votes
1 answer
61 views

Custom 401 page when Windows authentication fails using ASP.NET Core 6 Blazor on IIS / Kestrel

I am using Blazor Server and would like to display content for unauthorized users to help them. Instead of the defined NotAuthorized content, I receive error messages from IIS / Kestrel. App.razor: &...
-1 votes
0 answers
22 views

Docker .net Multi Container Communication Issue

I've got a Docker Compose file to run couple of .net containers. Containers get hosted and is listening on ports but cant connect with each other. Instead of building the .NET project through the ...
0 votes
1 answer
43 views

Is it possible to assign high priority to a certain route in ASP.NET Core?

A website in ASP.NET Core 7 on Kestrel handles thousands of API requests per second. I would like to have an endpoint /API/something_important that would have higher priory over handling all other ...
0 votes
0 answers
35 views

How can i send message to the socket which is in kestrel?

I have listened to two local ports through kestrel which are worked good. webBuilder .UseKestrel(opt => { // http request opt.ListenLocalhost(5000); // simple tcp ...
  • 51
1 vote
1 answer
100 views

Timeout when calling ASP.NET Core app on Kestrel in Docker on Ubuntu Linux with SSL

I am having trouble getting a simple ASP.NET Core Hello World app working in Docker on Ubuntu 20.04 using SSL. Here are the setup details: Development environment is Visual Studio 2022 on Windows 10. ...
  • 332
3 votes
0 answers
125 views

dotnet run hangs / is stuck

A razor webapp can no longer be started on my machine. The build command dotnet build works as expected but dotnet run is stuck after the first warnings. C:\dev\mywebapp>dotnet run Building... C:\...
  • 5,236
1 vote
2 answers
110 views

How to test UseHttpsRedirection setting locally in .NET Core

In my ASP.NET Core project, I have turned ON HTTPS Redirection, with this setting in my Program.cs: app.UseHttpsRedirection(); I have referred to MS doc. Locally, when I run my Core Web project, it ...
0 votes
0 answers
174 views

Windows Authentication first and AspNetCore.Identity as fallback in ASP.NET Core 6 using Kestrel

I am using ASP.NET Core 6 and Kestrel (not IIS). I set up AspNetCore.Identity with an ApplicationUser class extending IndentiyUser which has a property WindowsLogin containing the Active Directory Sid ...
  • 3,169
1 vote
0 answers
49 views

Kestrel gives bad request after FIN and end of request

I have a API made in Dotnet 6, running in a docker container and hosted on AWS. The client is built in Wordpress and uses php curl to make requests to the api. The Api is built with using minimal APIs ...
1 vote
1 answer
40 views

Do I require HttpsRedirection?

"Kestrel": { "Endpoints": { "Https": { "Url": "https://*:443", "Protocols": "Http1" }, "...
  • 2,319
0 votes
1 answer
273 views

Remove SERVER from response header in C# 6 [duplicate]

I have a .net 6.0 C# API (developed on a Mac using Kestrel server) that is returning server in the response header. All the solutions I have tried for are for pre-6 and are no longer relevant. I ...
  • 499
1 vote
0 answers
15 views

How can I monitor/log file upload progress on a Kestrel web server?

I am trying to monitor the current file's upload progress server side. I can't find a way to intercept the upload event to log the upload progress of a file. I am uploading large files, so this ...
0 votes
0 answers
99 views

Kestrel ASP.Net Core 6.0 handling of expired client certificates - different behaviour when CustomTrustStore is used

I am using a self-hosted Kestrel Asp Net Core web server and am testing the behaviour when a client sends an expired certificate. The test is peformed with two scenarios, one with the root certificate ...
  • 281
0 votes
1 answer
54 views

VS 2022 C# Server hot reload with docker

I work on several C# backends that serve up through kestrel and the whole thing is developed and deployed in dockers. Everything works fine, but I would love to get hot reload working for development....
  • 109
0 votes
0 answers
71 views

Why I am getting Kestrel binding permission denied error over port 443 while container running as non root user

I am running .Net 6 api app as a non-root user and trying to set ASPNETCORE_HTTPS_PORT = 443. FROM mcr.microsoft.com/dotnet/aspnet:6.0-alpine AS final ENV ASPNETCORE_URLS=https://+:443 ENV ...
  • 9,550
1 vote
1 answer
53 views

Why I'm getting a HTTP 400 (bad request) error when I'm posting user credentials with JQuery .ajax() method, to a C# controller? (ASP.NET Mvc Kestrel)

Introduce what I have Hello there, so I want to create a Kestrel web application in C#, that register users based on their information that they provided by filling the input boxes in an HTML page. ...
0 votes
1 answer
61 views

ASP .NET Core Application Process Isolation for IIS hosted Kestrel Services

I'm migrating a service based integration platform from .Net Framework to .Net Core. The original versions of the integration platform have proven very successful and compared to replacing it with a '...
  • 3
0 votes
1 answer
211 views

Deploying Azure App Service Webjob Using .Net 6 Fails to Start "Failed to bind to address http://127.0.0.1:5000: address already in use"

I ran into an issue while migrating an Azure app service from .Net Core 5 to 6 while also updating the stack configuration in Azure Portal to use .Net version ".Net 6 (LTS)". The app service ...
1 vote
0 answers
135 views

Handling Windows Authentication failure in Blazor Server app (Kestrel)

I am making a Blazor intranet app with Windows Authentication for domain users, using Kestrel, and .NET 6.0.11. Following the instructions in Configure Windows Authentication in ASP.NET Core (31 Aug ...
  • 138k
1 vote
0 answers
42 views

Unable to authenticate to http API when using public url from same machine (Kestrel/.NET7)

I have a .NET7 service which is running kestrel to host an http API (REST controller). The service uses windows authentication with a local windows account. There is an SSL certificate installed and ...
  • 243
1 vote
2 answers
504 views

C# Certificate Authentication with gRPC

I am trying my hand at gRPC in C# and wanted to do authentication integration with aspnet core .Net 6. I am following the tutorial on microsoft for setting up a gRPC application. The application works ...
  • 3,106
0 votes
1 answer
59 views

.NET poor performance of X509Certificate2 and RSA

I'm working on a cross platform multi-tenant application with dynamic SSL certificates. Initially, I was using the .NET RSA functions, but since they're not cross platform I switched that portion to ...
2 votes
1 answer
134 views

Launching a in memory server to test Blazor Wasm using Playwright

I've been looking at Playwright as a replacement for Selenium to process end-to-end tests. I would like to run the tests in memory, as there are many benefits from using mock services and removing all ...
  • 67
0 votes
0 answers
478 views

Detected a TLS handshake to an endpoint that does not have TLS enabled

I have an ASP.NET Core Web API running in a Linux Docker container orchestrated using Docker compose. When I try to access the Swagger endpoint of the Web API on HTTPS, the browser cannot reach the ...
0 votes
0 answers
71 views

OutOfMemoryException from Kestrel during performance testing

I'm running a K6 script to generate a number (> 60) of API calls to my container. Each of these calls has several objects in its request body. If the object count exceeds a certain limit (such that ...
0 votes
1 answer
315 views

ASP Net Core Kestrel WebServer loads self-signed root certificate from file but still needs to be in the Trusted Root Certification Authorities Store

I have an ASP Net Core 6 application with Kestrel Web Server, that requires mTLS between client applications and server. I created self-signed root and child certificates for the clients, using the ...
  • 281
0 votes
0 answers
57 views

Kestrel not respecting ASPNETCORE_ENVIRONMENT set in .pubxml with IWebHostBuilder.UseUrls

I have a .net core 3.1 web application that I'm publishing to a server. It works well for my default environment. I have it listening on port 5000. But when I try to add logic that sets the port to ...
  • 5,452
0 votes
0 answers
30 views

What's the equivalent of htpasswd in ASP.NET Core

I am working on an ASP.NET Core web application. Please note I am not working with IIS. The maintenance team, in charge of the server administration does not have access to the application source code....
  • 7,375
0 votes
1 answer
265 views

self hosted ASP.NET core Web API with Kestrel using HTTPS

I'm attempting to convert an old WCF service to an ASP.NET Core Web API, making use of the CoreWCF package. A key feature of this existing service is that it's being self hosted by an other ...
0 votes
1 answer
410 views

Self Hosted Asp Net Core Web server, client authentication with self-signed certificates

I am testing a self-hosted Asp Net Core Web server (Kestrel), and I am struggling with the client authentication using self-signed certificates. This is my startup code WebApplicationBuilder ...
  • 281
0 votes
2 answers
190 views

IIS vs HTTP.SYS for hosting an internet ASP.NET core website

I'm trying to understand the options for hosting an asp.net core website on the internet today. I understand that HTTP.SYS based hosting is possible without having IIS on the webserver but I've not ...
  • 2,162
0 votes
0 answers
86 views

ASP.NET Core get http version from WebApplication

I need to start a webserver without a specific IP and Port with HTTP 1.1 and HTTP 2. After start, i need to provide the webservers IP, Port and HTTP version of each url. var builder = WebApplication....
0 votes
2 answers
143 views

On a new ASP.NET Core hosted site, why does changing ASPNETCORE_ENVIRONMENT to any custom value cause hosting failure locally, without error?

If I go through these steps: Open Visual Studio 2022 Create a new Blazor WebAssembly project (I don't think the template matters, any ASP.NET Core-hosted site would be the same). Run the server self-...
0 votes
0 answers
104 views

configure method from startup is not hitting in .net core 6

We are using GIT with Azure DevOps for version control. and I am using Visual Studio 2022 and .Net 6. My application is not hitting the configure method from the startup.cs file after pulling the ...
  • 131
0 votes
0 answers
797 views

How to add ssl certificate to .Net core Project with Kestrel

I'm trying to add an ssl certificate to .net core project with Kestral. I have tried to configure ssl certificate pfx file path and the password on appsettings.json file, this solution worked for me ...
  • 67
0 votes
0 answers
228 views

eshop on Web ASP.Net core sample webapplication works with Kestrel (dotnet run) but can't be deployed in IIS

I used visual studio 2022 to build eshopOnWeb ASP.Net core app (https://github.com/dotnet-architecture/eShopOnWeb). It can run in VStudio as well as "dotnet run" command but when I deployed ...
  • 21
0 votes
0 answers
114 views

how to use my public ip with kestrel (asp.net core 3.1)

I want to host an asp.net core 3.1 web api. I can make it run by using dotnet api.dll but it runs on localhost by default. I tried using dotnet api.dll --urls http://0.0.0.0:8000 (checked that 8000 ...
1 vote
1 answer
484 views

NGINX reverse proxy to ASP.NET Core web app 404 static files

Have a basic hello world ASP.NET Core web app with the only modifications being to program.cs -> removed httpsredirect and hsts so it's set up for http. Published to an Ubuntu server under /var/www/...
  • 61
1 vote
1 answer
325 views

How to call GRPC Server in NGINX config

How to call GRPC Server which is located in docker container on Swarm cluster from NGINX reverse proxy? GRPC Server in container/service called webui with kestrel development certificate installed ...
1 vote
1 answer
391 views

Is there a way to run Kestrel (or something similar) dynamically and without the use of host builders?

I would like to spin up web servers whenever I like, from whichever .NET6 process I like. For example, I would like to start up one or more web servers, at any given moment, from a WPF app, or from a ....
  • 4,296
0 votes
1 answer
72 views

Need a less invasive way to host a C# MVC app in docker over https

I have a C# asp.net mvc app. I launch it via docker and it works perfectly. It even works over https. On the initial run, I have to run these commands: dotnet dev-certs https --clean dotnet dev-certs ...
0 votes
0 answers
148 views

DotNet Core Kestrel sends response header in lower case

We have containerized our DotNetCore app using Docker and running on OpenShift. We are add few custom response headers and we observed that the custom response headers are returned in Lower case ...
  • 1,994
0 votes
1 answer
91 views

kestrel web api causes its client app failure of An existing connection was forcibly closed by the remote host

Thanks everyone for your generosity to share your knowledge and expertise. I have a .Net 5 Web API application for uploading large files (>6GB). If this App is running from Visual Studio 2022's ...
  • 1,420
0 votes
1 answer
105 views

How to get caller identity in a self-hosted CoreWCF server?

I am converting some legacy code to .net6. I have a WCF server implemented as a Windows Service which uses ServiceSecurityContext.Current.WindowsIdentity to inspect the caller. The caller will ...
0 votes
0 answers
13 views

Kestral is showing folder path instead of process name while executing

When a dotnet core application is executed using dotnet core CLI , Kestral is the web server. In Kestral the name of the process that hosts and process the application is dotnet.exe . CLI should ...
0 votes
0 answers
64 views

.NET Setting up certificate for Kestrel service for development

I'm trying to develop an Alexa skill, and I want it to work against my development server so I can debug the incoming requests (I've set up a domain name that points to my IP and I've set up port ...
1 vote
1 answer
399 views

Is running Kestrel on Linux without a reverse proxy recommended? [closed]

I have seen a lot of articles say that it is not advised to expose Kestrel directly to the internet. It is better to use it behind a reverse proxy like Nginx. However, almost all of these sites are 4+ ...
  • 1,416
0 votes
1 answer
207 views

kestrel serve static file starting with a dot

kestrel (net5.0-windows) is configured to serve static files and allow directory browsing for a non-bare git repository: services.AddDirectoryBrowser(); var requestPath = ""; var ...
  • 117
1 vote
2 answers
595 views

Unable to set response header "Connection" in ASP.NET Core 6

I have an ASP.NET Core 6 Web API and the requirement to set a Connection: Close header in certain situations to put some legacy terminals (client) in a maintenance mode. I can set the headers in ...

1
2 3 4 5
16