From 2b929327aad9cbe475d0cccfdce4bc274add12b1 Mon Sep 17 00:00:00 2001 From: John Luo Date: Thu, 7 Apr 2016 10:44:21 -0700 Subject: [PATCH] Moving web.config and use ANCM --- samples/RoutingSample.Web/Startup.cs | 5 +++-- samples/RoutingSample.Web/hosting.json | 3 --- samples/RoutingSample.Web/project.json | 18 ++++++++++-------- samples/RoutingSample.Web/web.config | 9 +++++++++ samples/RoutingSample.Web/wwwroot/web.config | 9 --------- 5 files changed, 22 insertions(+), 22 deletions(-) delete mode 100644 samples/RoutingSample.Web/hosting.json create mode 100644 samples/RoutingSample.Web/web.config delete mode 100644 samples/RoutingSample.Web/wwwroot/web.config diff --git a/samples/RoutingSample.Web/Startup.cs b/samples/RoutingSample.Web/Startup.cs index 7fde54e6f8..9da63b77e7 100644 --- a/samples/RoutingSample.Web/Startup.cs +++ b/samples/RoutingSample.Web/Startup.cs @@ -38,7 +38,7 @@ namespace RoutingSample.Web b.Use(next => async (c) => { var culture = new CultureInfo((string)c.GetRouteValue("lang")); -#if DNX451 +#if NET451 Thread.CurrentThread.CurrentCulture = culture; Thread.CurrentThread.CurrentUICulture = culture; #else @@ -66,7 +66,8 @@ namespace RoutingSample.Web { var host = new WebHostBuilder() .UseDefaultHostingConfiguration(args) - .UseIISPlatformHandlerUrl() + .UseKestrel() + .UseIISIntegration() .UseStartup() .Build(); diff --git a/samples/RoutingSample.Web/hosting.json b/samples/RoutingSample.Web/hosting.json deleted file mode 100644 index 6a93dbafa8..0000000000 --- a/samples/RoutingSample.Web/hosting.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "server": "Microsoft.AspNetCore.Server.Kestrel" -} diff --git a/samples/RoutingSample.Web/project.json b/samples/RoutingSample.Web/project.json index 10a128a1d3..efdd321778 100644 --- a/samples/RoutingSample.Web/project.json +++ b/samples/RoutingSample.Web/project.json @@ -1,6 +1,6 @@ { "dependencies": { - "Microsoft.AspNetCore.IISPlatformHandler": "1.0.0-*", + "Microsoft.AspNetCore.Server.IISIntegration": "1.0.0-*", "Microsoft.AspNetCore.Server.Kestrel": "1.0.0-*", "Microsoft.AspNetCore.Routing": "1.0.0-*", "Microsoft.NETCore.Platforms": "1.0.1-*" @@ -8,16 +8,18 @@ "compilationOptions": { "emitEntryPoint": true }, - "commands": { - "web": "RoutingSample.Web" - }, "frameworks": { - "dnx451": {}, + "net451": {}, "netstandardapp1.5": { + "dependencies": { + "NETStandard.Library": "1.5.0-*" + }, "imports": [ - "dnxcore50", - "portable-net451+win8" + "dnxcore50" ] } - } + }, + "content": [ + "web.config" + ] } \ No newline at end of file diff --git a/samples/RoutingSample.Web/web.config b/samples/RoutingSample.Web/web.config new file mode 100644 index 0000000000..652885d9fb --- /dev/null +++ b/samples/RoutingSample.Web/web.config @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/samples/RoutingSample.Web/wwwroot/web.config b/samples/RoutingSample.Web/wwwroot/web.config deleted file mode 100644 index 9a0d90abf8..0000000000 --- a/samples/RoutingSample.Web/wwwroot/web.config +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - \ No newline at end of file