Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Convert UseKestrel to ConfigureKestrel #7851

Closed
Tratcher opened this issue Jul 27, 2018 — with docs.microsoft.com · 6 comments
Closed

Convert UseKestrel to ConfigureKestrel #7851

Tratcher opened this issue Jul 27, 2018 — with docs.microsoft.com · 6 comments
Assignees
Labels

Comments

Copy link
Member

See aspnet/KestrelHttpServer#2760


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

@Rick-Anderson Rick-Anderson added this to the Sprint 141 (9/3 to 9/21) milestone Jul 27, 2018
@scottaddie scottaddie added the 2.2 label Jul 27, 2018
@guardrex guardrex changed the title 2.2: Convert UseKestrel to ConfigureKestrel Convert UseKestrel to ConfigureKestrel Aug 1, 2018
@guardrex
Copy link
Collaborator

guardrex commented Sep 1, 2018

@Tratcher

We might not have exact matches to this pattern inlined into topics; but just in case, I have a question along the lines that John asked on the PR ...

In the non-CreateDefaultBuilder case (WebHostBuilder in direct use) and the dev needs additional config, I presume it's ok to use the overload for the config ...

var host = new WebHostBuilder()
    .UseKestrel((context, options) => { ... })
    .UseContentRoot(Directory.GetCurrentDirectory())
    .UseIISIntegration()
    .UseStartup<Startup>()
    .Build();

Otherwise, I'm tracking down cases where CreateDefaultBuilder is used and there's also a UseKestrel called after it to configure options. There are a few examples of this scenario to address (with versioning) in the Web Host and Kestrel topics.

As for samples, I've made a note to keep an eye out on 2.2 sample updates for any cases where this arises. We don't generally update samples for the next release until RTM (as u know, we don't have versioning for patch-updated samples), but I'll make sure (if I'm still here) that this gets addressed.

@guardrex
Copy link
Collaborator

guardrex commented Sep 1, 2018

@Rick-Anderson @scottaddie Hitting the need to avoid moniker-ranges within moniker-ranges now. These updates result in 1.x, 2.0/2.1, and 2.2 content, which I can do in a single file (it's taking on a Swiss 🧀 character) ......

::: moniker range=">= aspnetcore-2.0"

**Begin 2.0 or later content**

::: moniker-end

::: moniker range=">= aspnetcore-2.2"

**Drop out for 2.2 or later content**

::: moniker-end

::: moniker range="= aspnetcore-2.0 || aspnetcore-2.1"

**2.0/2.1 content**

::: moniker-end

::: moniker range=">= aspnetcore-2.0"

**Back to 2.0 or later content**

::: moniker-end

::: moniker range="< aspnetcore-2.0"

**1.x content**

::: moniker-end

There's still no concept of file versioning, right?

  • 1.x file
  • 2.x file
    • Range for 2.0/2.1
    • Range for 2.2 or later

@Tratcher
Copy link
Member Author

Tratcher commented Sep 1, 2018

Yes, UseKestrel with WebHostBuilder is fine.

@jjxtra
Copy link

jjxtra commented Aug 15, 2019

It seems self contained builds with latest .net core sdk and configure kestrel do not setup a web server when calling builder.ConfigureKestrel, anyone else having this issue? If I comment out the ConfigureKestrel call, a web server spins up fine.

Debugging locally in visual studio everything works fine calling builder.ConfigureKestrel...

@guardrex
Copy link
Collaborator

@jjxtra We only handle doc issues on this repo. Ask on the engineering repo, but they'll need a bit more info: Show them your code or put up a repro project on GH that demos the problem. State the framework error message.

https://github.com/aspnet/AspNetCore/issues

btw - It's ok to open a new doc issue from the feedback button at the bottom of any live topic.

@jjxtra
Copy link

jjxtra commented Aug 15, 2019

It was an issue with the ASPNETCORE_ENVIRONMENT variable being null and an exception in a background task.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants