kestrel-http-server

Can't cancel task in Asp.net core Action

允我心安 提交于 2019-12-10 13:15:17
问题 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. Based on it issue should be fixed already. I am using .Net core 2.1. 回答1: As I know this is known issue and doesn't fixed yet. See more details on ANCM project page. 来源: https://stackoverflow.com/questions/50702303/cant-cancel-task-in-asp-net-core

Will IIS recycle the asp.net core process?

跟風遠走 提交于 2019-12-10 03:09:23
问题 I need to run long running background tasks in my asp.net core application. I know of Azure Webjobs and other out of process techniques but I'd rather keep the solution simple and runs those tasks directly in the asp.net core process. I use Kestrel and the application is hosted in IIS. I understand that IIS will occasionally recycle the IIS process. Will it also recycle the asp.net core process? 回答1: Asp.Net Core < 2.2 Asp.net Core runs in a separate process dotnet.exe even when it is hosted

ASP.Net Core application service only listening to Port 5000 on Ubuntu

妖精的绣舞 提交于 2019-12-09 13:03:06
问题 I am trying to host an ASP.Net Core MVC application (https redirection is enabled) on Ubuntu server, using Nginx as a reverse proxy. I have created and installed a local SSL certificate using OpenSSL. When i run my application using dotnet CLI it listens on both http://localhost:5000 & https://localhost:5001 , and i am able to access it on web using https (http requests are being redirect to https by Nginx). The problem is when i try to run the as a service, it only listens on http:/

Failed to Authenticate HTTPS connection when attempting GET from WebApi

倾然丶 夕夏残阳落幕 提交于 2019-12-08 15:53:19
问题 I am using ASP.Net Core and I have 2 projects. ASP.Net Core MVC application ASP.Net Core WebApi application If i attempt one of the WebApi end points using Postman i do not have any issues and the /api/values returns as expected (standard test endpoint) However if i attempt the same operation using the MVC application I get a very frustrating error: HttpsConnectionFilter[1] Failed to authenticate HTTPS connection I am hosting using Kestrel for Asp.Net core. I have a self signed PFX

Kestrel on AspNet vNext doesnt serve index page under /

谁都会走 提交于 2019-12-08 15:43:53
问题 I need to be able to serve my 'index.html', under the default url / , using Kestrel web server. Right now I'm only able to access my static files with the full path i.e /index.html Again this works perfectly on VisualStudio, the context is OSX with Kestrel This is my Startup.cs public void ConfigureServices(DI.IServiceCollection services) { services.AddMvc(); } public void Configure(IApplicationBuilder app) { app.UseStaticFiles(); app.UseMvc(); } The solution I have so far, is to do a

Why do I get a 404 trying to post a large file to a Core Web API

廉价感情. 提交于 2019-12-08 15:14:59
问题 I am very new to file transfer between HttpClient and a Web API, so please excuse any ignorance and guesswork in my code. I have been trying to post a file created with System.IO.Compression.ZipFile to my web API now for about a day, and always I get a 404 response. If I post with an empty stream, the API action method is invoked, so I know the 404 is due to content and not the URI. This method is in the client WPF application that attempts to post the file: public async Task PostDirAsync

Kestrel with IIS - libuv.dll missing on run

女生的网名这么多〃 提交于 2019-12-08 14:42:18
问题 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: public class WebApiApplication : System.Web.HttpApplication { protected void Application_Start() { AreaRegistration.RegisterAllAreas(); GlobalConfiguration.Configure(WebApiConfig.Register); FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters); RouteConfig.RegisterRoutes(RouteTable.Routes); AutoMapperConfig

Configurable port number when using Kestrel?

∥☆過路亽.° 提交于 2019-12-08 02:03:48
问题 I have done the following but it still doesn't work. Running dotnet myapp.dll still shows it's listening http://localhost:5000. Create hosting.json Code: { "server.url": "http://*:5001" } Updated Program.cs Code: public class Program { public static void Main(string[] args) { var config = new ConfigurationBuilder() .SetBasePath(Directory.GetCurrentDirectory()) .AddJsonFile("hosting.json", optional: true, reloadOnChange: true) .Build(); var host = new WebHostBuilder() .UseConfiguration(config)

Windows Authentication for Kestrel hosted in Windows service

穿精又带淫゛_ 提交于 2019-12-07 14:11:58
问题 I am running an ASP.NET Core application hosted in a Windows service as described here: https://docs.microsoft.com/en-us/aspnet/core/host-and-deploy/windows-service?view=aspnetcore-2.1 I need this application to support Windows Authentication. What are my options? I tried using Application Request Routing / URL Rewrite module in IIS as a reverse proxy with Windows Authentication but could not figure out how to make that work. Any guidance would be appreciated. 回答1: Microsoft has a whole

Kestrel + IIS Reverse Proxy RequestAborted Not Triggered

喜欢而已 提交于 2019-12-07 09:20:00
问题 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)