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

Attempts to fix urls from appsettings.json, CLI #1298

Closed
wants to merge 1 commit into from

Conversation

b-stime
Copy link

@b-stime b-stime commented Dec 20, 2017

WebHost checks _config for the deprecated "server.urls" key but it also checks _config for the new key . I believe it should use _startup.Configure for the new key. The ultimate problem I'm trying to solve is that:

WebHost.CreateDefaultBuilder(args)
.UseStartup()
.Build();

...doesn't read the urls from appsettings.json or the command line. The builder pushes the values into the Startup constructor so they should be available via Startup.Configure.

I haven't tested this change--I'm editing via the GitHub web interface.

WebHost checks _config for the deprecated "server.urls" key but it also checks _config for the new key . I believe it should use _startup.Configure for the new key. The ultimate problem I'm trying to solve is that:

WebHost.CreateDefaultBuilder(args)
                .UseStartup<Startup>()
                .Build();

...doesn't read the urls from appsettings.json or the command line.

I haven't tested this change--I'm editing via the GitHub web interface.
Copy link

@muratg muratg left a comment

Choose a reason for hiding this comment

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

What are you exactly trying to fix? Is there a bug filed for the issue you're targeting here?

@Tratcher
Copy link
Member

This code doesn't compile. _startup.Configure is a method, not an IConfiguration instance. I'm closing this and we can discuss it issue over at #1299.

@Tratcher Tratcher closed this Dec 20, 2017
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.

3 participants