KestrelHttpServer | cross platform web server for ASP.NET Core
kandi X-RAY | KestrelHttpServer Summary
kandi X-RAY | KestrelHttpServer Summary
This GitHub project has been archived. Active development has moved to This repo contains a cross-platform web server for ASP.NET Core. This project is part of ASP.NET Core. You can find samples, documentation and getting started instructions for ASP.NET Core at the [AspNetCore] repo.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of KestrelHttpServer
KestrelHttpServer Key Features
KestrelHttpServer Examples and Code Snippets
Community Discussions
Trending Discussions on KestrelHttpServer
QUESTION
I have a very simple node service exposing an endpoint aimed to use Server Send Events (SSE) connection and a very basic ReactJs client consuming it via EventSource.onmessage.
Firstly, when I set a debug point in updateAmountState (Chrome Dev) I can't see it evoked.
Secondly, I am getting net::ERR_INCOMPLETE_CHUNKED_ENCODING 200 (OK). According to https://github.com/aspnet/KestrelHttpServer/issues/1858 "ERR_INCOMPLETE_CHUNKED_ENCODING in chrome usually means that an uncaught exception was thrown from the application in the middle of writing to the response body". Then I checked the server side to see if I find any error. Well, I set break point in few places in server.js in both setTimeout(() => {... and I see it run periodically. I would expected each line to run once only. So it seems the front-end is trying permanently call the backend and getting some error.
The whole application, both front in ReactJs and the server in NodeJs can be found in https://github.com/jimisdrpc/hello-pocker-coins.
backend:
...ANSWER
Answered 2019-Oct-15 at 08:14I'm not a Node.js expert myself, but it looks like you miss "'Connection': 'keep-alive'" and a "\n" after that - i.e.:
QUESTION
I'm creating an ASP.net Core 2.0 app to run on the .net Core 2.0 runtime, both currently in their Preview versions. However, I cannot figure out how to have Kestrel use something other than the default http://localhost:5000
listen URL.
Most documentation that I could Google talks about a server.urls
setting, which seems to have been changed even in 1.0-preview to just be urls
, however neither works (turning on Debug logging has Kestrel telling me that no listen endpoints are configured).
A lot of documentation also talks about a hosting.json
and that I can't use the default appsettings.json. However, if I compare the recommended approach of loading a new config, this looks pretty much exactly like what the new WebHost.CreateDefaultBuilder
method does, except that it loads appsettings.json.
I currently don't understand how appsettings.json and IConfigureOptions
are related, if at all, so it's possible that my trouble stems from a lack of understanding of what KestrelServerOptionsSetup
actually does.
ANSWER
Answered 2017-May-22 at 17:14I got it working with this
QUESTION
In the previous version of ASP.NET MVC, URLs like the following were tolerated: https://www.trap.com//house
.
Now, this generates a 404
, which makes sense in a way. I like that by default ASP.NET Core MVC now is less tolerant of nonsense in general.
But I am left wondering how to go about the suggestion of implementing a middleware to address the issue. I found this example, but I don't want to redirect the user to the "right" or canonical URL - I want to tolerate the bad one.
In other words, I want the URL https://www.trap.com//house
to be routed as though it were the URL https://www.trap.com/house
. Or the URL https://www.trap.com///house/////4
to be routed as though it were the URL https://www.trap.com/house/4
.
What is the best way to achieve this? URL rewriting? Special routes? Something else?
...ANSWER
Answered 2018-Nov-09 at 18:14I ended up using the rewrite middleware to accomplish this, although I will probably end up removing it...
QUESTION
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 before the server request has completed.
We've deployed this application to IIS (as a reverse proxy) and running on Kestrel. Prior to Core 2.x Kestrel had a bug that caused HttpContext.RequestAborted
to always be false
(other related question here)...which was apparently fixed in 2.x (which I've been able to confirm).
However, it appears that when running IIS in front of Kestrel, it doesn't forward the request abort through to Kestrel and RequestAborted
is still always false
Is there any way to get RequestAborted
working in this configuration (or any other way to detect it if not)?
Simple reproduction repo: https://github.com/mikeomeara1/RequestAbortRepro
UPDATE
This Comment seems to indicate a known issue but it's largely unclear to what extent
This Question seems to also be related but again it's not completely apparent to me that it's directly related (at least it isn't spelled out in such terms).
@spender - If I understood you correctly, the header comparison is here. If not, let me know, I'll get you whatever you want to see.
It seems the tea leaves are indicating a known issue. So, the question is; Is there a way to work around this? We just went through (a very painful) 1.1 to 2.x upgrade in the hopes this issue would be addressed and letting our server thrash for another month/quarter/year has us pretty concerned at this point. The system we're working on is greatly scaling up in volume.
So, any workarounds, hacks or crazy ideas are welcome.
...ANSWER
Answered 2018-Jul-26 at 00:12This is known issue and isn't fixed yet. See https://github.com/aspnet/AspNetCoreModule/issues/38
QUESTION
I just tried to debug a project which is built with asp.net core 2.0. It however compiles successfully but failed when it starts the kestrel server.
The runtime exception I get is
Unrecognized scheme in server address ' http://localhost:56950/'. Only 'http://' is supported.
As far as I understood it, it has to do something with https://
server schemes. But I don't remember If I accidentally put https
configuration somewhere.
I stumbled upon this source with no luck so far.
Can anyone put me in right direction ?
Error
...ANSWER
Answered 2018-Jun-27 at 10:10It looks like an issue with a leading 'space' - url should not begin with space.
Check why your address is starting from a 'wite' character - probably that's spell mistake in your config (see Project Properties -> web tab).
QUESTION
We're setting up an existing Web API server to serve site(s) alongside an existing API. I have been loosely following this article.
Here's what my Global.asax.cs looks like:
...ANSWER
Answered 2017-May-26 at 13:58Try this - it could solve your problem:
QUESTION
I would like to setup HTTPS for my ASP.NET core application as well as defining different ports on which my app can listen to (e.g. a bit like what was shown by Scot Hanselman a while ago: https://channel9.msdn.com/Events/Build/2017/B8048).
I have checked the official resources:
- https://docs.microsoft.com/en-us/aspnet/core/security/enforcing-ssl
- https://docs.microsoft.com/en-us/aspnet/core/security/https
I thought that the default builder was supposed to dig in the appsettings.json (or the appsettings.Development.json when it is relevant).
Program.cs content:
...ANSWER
Answered 2017-Aug-24 at 08:29Looks like you need to call UseConfiguration
directly to set an URL address read from appsettings.json
:
QUESTION
In the ASP.NET Core Main method below, how can I determine the hosting environment, so I can switch between different certificate files for HTTPS?
...ANSWER
Answered 2017-Jan-30 at 18:01I've tried this and it did seem to work, but you might wan't to double check...
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install KestrelHttpServer
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page