99using Microsoft . AspNet . Http ;
1010using Microsoft . AspNet . Mvc ;
1111using Microsoft . AspNet . Routing ;
12- using Microsoft . Framework . ConfigurationModel ;
12+ using Microsoft . Dnx . Runtime ;
13+ using Microsoft . Framework . Configuration ;
1314using Microsoft . Framework . DependencyInjection ;
1415using Microsoft . Framework . Logging ;
1516
1617namespace GitAttributesWeb
1718{
1819 public class Startup
1920 {
20- public Startup ( IHostingEnvironment env )
21+ public Startup ( IHostingEnvironment env , IApplicationEnvironment appEnv )
2122 {
2223 // Setup configuration sources.
23- var configuration = new Configuration ( )
24+ var configuration = new ConfigurationBuilder ( appEnv . ApplicationBasePath )
2425 . AddJsonFile ( "config.json" )
2526 . AddJsonFile ( $ "config.{ env . EnvironmentName } .json", optional : true ) ;
2627
@@ -31,7 +32,7 @@ public Startup(IHostingEnvironment env)
3132
3233 configuration . AddEnvironmentVariables ( ) ;
3334
34- this . Configuration = configuration ;
35+ this . Configuration = configuration . Build ( ) ;
3536 }
3637
3738 public IConfiguration Configuration { get ; set ; }
@@ -41,7 +42,7 @@ public void ConfigureServices(IServiceCollection services)
4142 {
4243 services . AddApplicationInsightsTelemetry ( Configuration ) ;
4344
44- services . Configure < AppSettings > ( Configuration . GetSubKey ( "AppSettings" ) ) ;
45+ services . Configure < AppSettings > ( Configuration . GetSection ( "AppSettings" ) ) ;
4546
4647 // Add MVC services to the services container.
4748 services . AddMvc ( ) ;
@@ -75,7 +76,7 @@ public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerF
7576 if ( env . IsEnvironment ( "Development" ) )
7677 {
7778 app . UseBrowserLink ( ) ;
78- app . UseErrorPage ( ErrorPageOptions . ShowAll ) ;
79+ app . UseErrorPage ( ) ;
7980 }
8081 else
8182 {
0 commit comments