C# Class MusicStore.StartupNtlmAuthentication

To make runtime to load an environment based startup class, specify the environment by the following ways: 1. Drop a Microsoft.AspNetCore.Hosting.ini file in the wwwroot folder 2. Add a setting in the ini file named 'ASPNETCORE_ENVIRONMENT' with value of the format 'Startup[EnvironmentName]'. For example: To load a Startup class named 'StartupNtlmAuthentication' the value of the env should be 'NtlmAuthentication' (eg. ASPNETCORE_ENVIRONMENT=NtlmAuthentication). Runtime adds a 'Startup' prefix to this and loads 'StartupNtlmAuthentication'. If no environment name is specified the default startup class loaded is 'Startup'. Alternative ways to specify environment are: 1. Set the environment variable named SET ASPNETCORE_ENVIRONMENT=NtlmAuthentication 2. For selfhost based servers pass in a command line variable named --env with this value. Eg: "commands": { "web": "Microsoft.AspNetCore.Hosting --server Microsoft.AspNetCore.Server.WebListener --server.urls http://localhost:5002 --ASPNETCORE_ENVIRONMENT NtlmAuthentication", },
Mostrar archivo Open project: ivaylokenov/MyTested.AspNetCore.Mvc

Public Methods

Method Description
Configure ( IApplicationBuilder app, ILoggerFactory loggerFactory ) : void
ConfigureServices ( IServiceCollection services ) : void
StartupNtlmAuthentication ( IHostingEnvironment hostingEnvironment ) : System

Method Details

Configure() public method

public Configure ( IApplicationBuilder app, ILoggerFactory loggerFactory ) : void
app IApplicationBuilder
loggerFactory ILoggerFactory
return void

ConfigureServices() public method

public ConfigureServices ( IServiceCollection services ) : void
services IServiceCollection
return void

StartupNtlmAuthentication() public method

public StartupNtlmAuthentication ( IHostingEnvironment hostingEnvironment ) : System
hostingEnvironment IHostingEnvironment
return System