kestrel-http-server

IIS Deployed ASP.NET Core application giving intermittent 431 Request headers too long error

♀尐吖头ヾ 提交于 2021-02-07 19:49:49
问题 I am working on an ASP.NET Core application which consumes a GraphQL endpoint via RestSharp to retrieve the data. This is an intranet type application, deployed on a Windows 2016 IIS Server and we are utilizing Windows Authentication. The problem we are encountering is that a certain user, who belongs to a large number of active directory groups is getting intermittent 431 Request headers too long errors. I have attempted the following: I am setting the IISDefaults in the startup.cs for both

How to host a asp .net core application under a sub folder

↘锁芯ラ 提交于 2021-02-06 10:29:49
问题 I have a asp .net core app running on Linux using Kestrel. It binds to the ip ok on port 80. But the nginx reverse proxy site needs to host the app under a non-root path e.g. http://somesite.com/myapp So this is ok, the app loads, but the app does not know about the myapp path - so tries to load content path resources from root. Therefore css resources etc don't load. How do I configure the app ideally at runtime to know about the url path. Update: I have found that in Startup.configure using

How to host a asp .net core application under a sub folder

房东的猫 提交于 2021-02-06 10:29:21
问题 I have a asp .net core app running on Linux using Kestrel. It binds to the ip ok on port 80. But the nginx reverse proxy site needs to host the app under a non-root path e.g. http://somesite.com/myapp So this is ok, the app loads, but the app does not know about the myapp path - so tries to load content path resources from root. Therefore css resources etc don't load. How do I configure the app ideally at runtime to know about the url path. Update: I have found that in Startup.configure using

Find 2 different FREE ports for 2 kestrel servers

不羁的心 提交于 2021-01-28 14:03:03
问题 I need to start 2 Kestrel servers from a Console application. The code below shows how I'm doing it now. Unfortunately, both servers attempt to start on the same ports HTTP:5000 and HTTPS:5001 and only first one is actually started. I also tried to specify URLs in appsettings.json but it doesn't work as expected and I wouldn't like to hardcode server URLs, because if I restart Console app it doesn't kill previously started servers and can't start them again. Question How to find free ports

Certificate issue in Kestrel ssl JSON configuration using .net Core 3.1

Deadly 提交于 2021-01-28 11:45:54
问题 I have seen this question answered but it doesn't seem to be working for .net core 3.1 This code finds the Certificate: using (var store = new X509Store("Root", StoreLocation.LocalMachine)) { store.Open(OpenFlags.ReadOnly); var certCollection = store.Certificates; var currentCerts = certCollection.Find(X509FindType.FindBySubjectName, "*.timedesk.com", false); if (currentCerts.Count == 0) throw new Exception("Https certificate is not found."); } This appsettings.json does not find the

Certificate issue in Kestrel ssl JSON configuration using .net Core 3.1

微笑、不失礼 提交于 2021-01-28 11:39:50
问题 I have seen this question answered but it doesn't seem to be working for .net core 3.1 This code finds the Certificate: using (var store = new X509Store("Root", StoreLocation.LocalMachine)) { store.Open(OpenFlags.ReadOnly); var certCollection = store.Certificates; var currentCerts = certCollection.Find(X509FindType.FindBySubjectName, "*.timedesk.com", false); if (currentCerts.Count == 0) throw new Exception("Https certificate is not found."); } This appsettings.json does not find the

.NET Core gives unknown error while processing HTTPS certificate [closed]

|▌冷眼眸甩不掉的悲伤 提交于 2021-01-27 14:31:43
问题 Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 1 year ago . Improve this question I'm trying to build a .NET Core server that uses a HTTPS connection. I created a self-signed certificate using dotnet dev-certs tool and set up Kestrel like this: return WebHost.CreateDefaultBuilder(args) .UseKestrel(options => { options.Listen(IPAddress