Hosting configuration was made consistent #108

Open
pakrym opened this Issue Nov 10, 2015 · 1 comment

Comments

Projects
None yet
2 participants
@pakrym

pakrym commented Nov 10, 2015

We made hosting configuration keys to be consistent in command line/environment variables/hosting.json. Also Microsoft.AspNet.Hosting.json configuration file was renamed to hosting.json

Issue:
aspnet/Hosting#453

Related
#94

Old Key New Key Description
server or Hosting:Server Environment Variable: ASPNET_SERVER
hosting.json: server
Command Line: --server
Specifies which server to use
app or Hosting:App Environment Variable: ASPNET_APP
hosting.json: app
Command Line: --app
assembly containing startup class
ASPNET_ENV or Hosting:Environment Environment Variable: ASPNET_ENVIRONMENT or ASPNET_ENV (obsolete)
hosting.json: environment
Command Line: --environment
The environment to run as (Development, Production etc.)
webroot Environment Variable: ASPNET_WEBROOT
hosting.json: webroot
Command Line: --webroot
Webserver root, used by IIS and static file servers
Hosting:DetailedErrors Environment Variable: ASPNET_DETAILEDERRORS
hosting.json: detailedErrors
Command Line: --detailedErrors
Show detailed errors for startup failures

Sample Configuration File

{
   "webroot": "wwwroot",
   "server" : "Microsoft.AspNet.Server.Kestrel",
   "app": "MyProjectReference",
   "environment": "Development",
   "detailedErrors": true
}

Sample Environment Variables:
All environment variables are prefixed with ASPNET_ prefix.

ASPNET_WEBROOT=wwwroot
ASPNET_SERVER=Microsoft.AspNet.Server.Kestrel
ASPNET_APP=MyProjectReference
ASPNET_ENVIRONMENT=Development
ASPNET_DETAILEDERRORS=true

Sample Command line:

Microsoft.AspNet.Hosting --server Microsoft.AspNet.Server.Kestrel --webroot "wwwroot" --app "MyProjectReference" --environment "Development" --detailedErrors true

@pakrym pakrym added this to the 1.0.0-rc2 milestone Nov 10, 2015

@aspnet aspnet locked and limited conversation to collaborators Nov 10, 2015

@Tratcher

This comment has been minimized.

Show comment
Hide comment
@Tratcher

Tratcher Mar 22, 2016

Member

Note these environment variables have been updated to ASPNETCORE_ as described in #144 (comment).

Member

Tratcher commented Mar 22, 2016

Note these environment variables have been updated to ASPNETCORE_ as described in #144 (comment).

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.