Using WebListener in ASP.NET Core
October 25, 2016 by Anuraj
C# ASP.NET Core WebListener
This post is about using WebListener server in ASP.NET Core. WebListener is a web server for ASP.NET Core based on the Windows Http Server API. WebListener is a Windows-only HTTP server for ASP.NET Core. It runs directly on the Http.Sys kernel driver, and has very little overhead. WebListener cannot be used with the ASP.NET Core Module for IIS. It can only be used independently. Kestrel is designed to be run behind a proxy (for example IIS or Nginx) and should not be deployed directly facing the Internet.
Today Microsoft ASP.NET WebListener announced the release of WebListener 1.0.0 stable version.
You can add support for WebListener to your ASP.NET application by adding the Microsoft.AspNetCore.Server.WebListener
dependency in project.json and calling UseWebListener
extension method in the Main() method.
Project.json file
Program.cs file
And if you are using WebListener, the server will be displayed as “Microsoft-HTTPAPI/2.0”.
Happy Programming :)
Copyright © 2024 Anuraj. Blog content licensed under the Creative Commons CC BY 2.5 | Unless otherwise stated or granted, code samples licensed under the MIT license. This is a personal blog. The opinions expressed here represent my own and not those of my employer. Powered by Jekyll. Hosted with ❤ by GitHub