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

Hosting configuration was made consistent #108

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

Hosting configuration was made consistent #108

pakrym opened this issue Nov 10, 2015 · 1 comment

Comments

@pakrym
Copy link
Member

@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
Copy link
Member

@Tratcher 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.
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.