Skip to content
This repository has been archived by the owner on Dec 19, 2018. It is now read-only.

Removing DefaultHostingConfiguration #730

Merged
merged 1 commit into from
Apr 27, 2016

Conversation

JunTaoLuo
Copy link
Contributor

@JunTaoLuo JunTaoLuo commented Apr 27, 2016

This issue addresses #727, #700 and render #693 not applicable

As discussed offline with @davidfowl @Tratcher , we are removing default hosting configurations and the user is expected to construct their own configurations. The only exception is that we fallback to environment variables for the Environment option. I'll make an update to IISIntegration in a later PR to see what the changes there look like.

We will also need to update all of our samples again.

@@ -27,8 +28,10 @@ public void Configure(IApplicationBuilder app)
// Entry point for the application.
public static void Main(string[] args)
{
var config = new ConfigurationBuilder().AddCommandLine(args).Build();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove config from this sample.

@JunTaoLuo JunTaoLuo force-pushed the johluo/remove-default-config branch from 99e1681 to 109c28f Compare April 27, 2016 15:49
@Tratcher
Copy link
Member

Side note: The IISIntegration changes need to be checked in first, and they don't rely on any of these changes.

var config = new ConfigurationBuilder()
.AddCommandLine(args)
.AddEnvironmentVariables(prefix: WebHostDefaults.EnvironmentVariablesPrefix)
.AddJsonFile(WebHostDefaults.HostingJsonFile, optional: true)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove the WebHostDefaults.HostingJsonFile constant, it's no longer used in src.

I'm tempted to remove WebHostDefaults.EnvironmentVariablesPrefix as well, as it's only used once in src.

@JunTaoLuo JunTaoLuo force-pushed the johluo/remove-default-config branch 2 times, most recently from 587c746 to 79a7143 Compare April 27, 2016 16:37
@@ -28,7 +28,6 @@ public void Configure(IApplicationBuilder app)
public static void Main(string[] args)
{
var host = new WebHostBuilder()
.UseDefaultHostingConfiguration(args)
.UseStartup<StartupHelloWorld>()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

UseServer?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good catch, here and in StartupExternallyControlled.

@Tratcher
Copy link
Member

:shipit:

@JunTaoLuo JunTaoLuo force-pushed the johluo/remove-default-config branch from 79a7143 to e505ecb Compare April 27, 2016 18:40
@muratg
Copy link

muratg commented Apr 27, 2016

:shipit:

@JunTaoLuo JunTaoLuo merged commit e505ecb into release Apr 27, 2016
@JunTaoLuo JunTaoLuo deleted the johluo/remove-default-config branch April 27, 2016 21:34
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants