kestrel-http-server

Enable both Windows authentication and Anonymous authentication in an ASP.NET Core app

社会主义新天地 提交于 2019-11-28 19:38:30
I know that this has been asked many times before, but unfortunately not about ASP.NET Core web apps, just the classic ASP.NET web apps. All the answers i've found on the internet don't help me, because the IIS configuration of ASP.NET Core apps is so different than classic ASP.NET. For example, ASP.NET Core uses the Kestrel proxy, so many of the configurations relevant in ASP.NET are not in ASP.NET Core. I've basically tried everything i could possibly found on the Internet but none helped me. I whish it was as simple as enabling both anonymous and windows authentications on the app in IIS

How to use HTTPS / SSL with Kestrel in ASP.NET Core 2.x?

大兔子大兔子 提交于 2019-11-28 16:40:17
I am currently using ASP.NET Core 2.x and I used to be able to get Kestrel to to use HTTPS / SSL by simply putting it in the UseUrls() method like so: var host = new WebHostBuilder() .UseUrls("http://localhost", "https://111.111.111.111") .UseKestrel() .Build(); But now I get the exception: System.InvalidOperationException: HTTPS endpoints can only be configured using KestrelServerOptions.Listen(). How do I configure Kestrel to use SSL in ASP.NET Core 2.x? The basics. Using Server URLs If you want to associate your server to use all the IP addresses assigned to the server/web host then you can

Increase upload request length limit in Kestrel

大兔子大兔子 提交于 2019-11-28 09:04:04
I am running an ASP.NET Core web app and want to upload large files. I know that when running IIS, the limits can be changed via web.config : <httpRuntime maxRequestLength="1048576" /> ... <requestLimits maxAllowedContentLength="1073741824" /> How can you do the equivalent while running the new ASP.NET Core Kestrel web server? I get the exception "Request body too large." ToddBFisher I found this helpful announcement that confirms there is a 28.6 MB body size limit starting with ASP.NET Core 2.0, but more importantly shows how to get around it! To summarize: For a single controller or action,

ASP.NET Core 2.1 + Kestrel (How to disable HTTPS)

∥☆過路亽.° 提交于 2019-11-28 06:41:17
So it appears with the advent of ASP.NET Core 2.1, Kestrel now automatically creates an HTTPS endpoint along side the HTTP one, and default project templates are setup to redirect from HTTP to HTTPS (which is easy enough to undo). However my question is... how can I disable HTTPS entirely for my project. I've read through the docs and played with a variety of config settings for HTTPS but nothing I do seems to allow me to turn it off and just run an HTTP project. Am I crazy or just missing something. I would expect this to be super easy to do. Abhishek Kumar If you are using Visual Studio 2017

ASP.NET 5 Kestrel connect within LAN

喜欢而已 提交于 2019-11-28 05:23:27
问题 I would like to connect to my Kestrel server with ASP.NET 5 application hosted on it from another PC in the same network. Is it possible? I can ping my computer from cmd, but I get 'Connection timed out' when I try to connect from a web browser (I type this: "http://{my_kestrel_ip}:5000/"). 回答1: In your project folder you should have a file called hosting.ini . In that file by default you should have something like this: server=Kestrel server.urls=http://localhost:5000 You need to make the

What is Kestrel (vs IIS / Express)

眉间皱痕 提交于 2019-11-28 03:07:24
What is the kestrel web server and how does it relate to IIS / IIS Express? I come from developing apps on IIS Express and hosting them on an IIS web server. With ASP.NET Core I have a dependency on Microsoft.AspNetCore.Server.Kestrel and my startup has .UseServer("Microsoft.AspNetCore.Server.Kestrel") . But when I run my website, I still get the IIS Express icon in the system tray. Someone asked me if I was using IIS Express or Kestrel and I didn't know what to say! I don't have any cross-platform requirements as I develop on a PC and host in Azure, so I'm confused if I even need Kestrel, but

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

℡╲_俬逩灬. 提交于 2019-11-27 21:23:20
问题 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 benefits/drawbacks will that have (probably regardless if it's in Azure or not). I suppose it will be a bit faster since IIS will be excluded from the pipline, but it should not be too much overhead I suppose... 回答1: On Azure Web App, you cannot bypass

Configure ASP.NET Core 2.0 Kestrel for HTTPS

好久不见. 提交于 2019-11-27 19:27:10
TL;DR What is today the correct way to setup HTTPS with ASP.NET Core 2.0? I would like to configure my project to use https and a certificate like they have shown at BUILD 2017 . I have tried several settings but nothing worked. After some research, I am even more confused. It seems that there are many ways to configure URLs and ports… I have seen appsettings.json , hosting.json , via code, and in launchsettings.json we can also set the URL and port. Is there a "standard" way to do it? Here is my appsettings.development.json { "Kestrel": { "Endpoints": { "Localhost": { "Address": "127.0.0.1",

IIS vs Kestrel performance comparison

a 夏天 提交于 2019-11-27 17:26:01
问题 How does the performance of IIS look like comparing to a Kestrel http server? Seems like Kestrel is significantly inspired by the family of asynchronous and event-driven server frameworks. In the meantime, IIS has a long history of development and obviously more mature in terms of features. Taking all that into account, I'm specifically looking for a comparison of memory utilization, thread utilization, request related comparison (like request-per-second) and streaming capabilities. 回答1: Here

Is Kestrel using a single thread for processing requests like Node.js?

邮差的信 提交于 2019-11-27 17:12:29
Both Kestrel and Node.js are based on libuv . While Node.js exactly states that it uses an event loop , I can't seem to find if such is the case for Kestrel, or if it utilizes thread pooling / request queue like IIS? Kestrel behind a web server Node.js event loop ┌───────────────────────┐ ┌─>│ timers │ │ └──────────┬────────────┘ │ ┌──────────┴────────────┐ │ │ I/O callbacks │ │ └──────────┬────────────┘ │ ┌──────────┴────────────┐ │ │ idle, prepare │ │ └──────────┬────────────┘ ┌───────────────┐ │ ┌──────────┴────────────┐ │ incoming: │ │ │ poll │<─────┤ connections, │ │ └──────────┬─────────