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

Cannot set self-hosting url using command line argument and hosting.json after UseDefaultHostingConfiguration removed, #740

@xatabhk

Description

@xatabhk

After UseDefaultHostingConfiguration removed,
"dotnet run /server.urls http://xyz:5000" does not work any more. Neither does ""server.urls": "http://xyz:5000/"" in hosting.json. Only "UseUrls("http://xyz:5000")" in code works.

The following lines in Startup() seem dummy:

    .AddCommandLine(args)  
    .AddEnvironmentVariables(prefix: "ASPNETCORE_")  
    .AddJsonFile("hosting.json", optional: true)

Also 'args' is not available in Startup(), assigning it in main() to another static variable just for it is too much.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions