diff --git a/samples/RoutingSample.Web/Startup.cs b/samples/RoutingSample.Web/Startup.cs index 6ee715cead..db2907a9f7 100644 --- a/samples/RoutingSample.Web/Startup.cs +++ b/samples/RoutingSample.Web/Startup.cs @@ -4,6 +4,7 @@ using System.Globalization; using System.Threading; using Microsoft.AspNet.Builder; +using Microsoft.AspNet.Hosting; using Microsoft.AspNet.Http; using Microsoft.AspNet.Routing; using Microsoft.Extensions.DependencyInjection; @@ -60,5 +61,15 @@ namespace RoutingSample.Web app.UseRouter(routeBuilder.Build()); } + + public static void Main(string[] args) + { + var application = new WebApplicationBuilder() + .UseConfiguration(WebApplicationConfiguration.GetDefault(args)) + .UseStartup() + .Build(); + + application.Run(); + } } } \ No newline at end of file diff --git a/samples/RoutingSample.Web/hosting.json b/samples/RoutingSample.Web/hosting.json new file mode 100644 index 0000000000..f8ef14574d --- /dev/null +++ b/samples/RoutingSample.Web/hosting.json @@ -0,0 +1,3 @@ +{ + "server": "Microsoft.AspNet.Server.Kestrel" +} diff --git a/samples/RoutingSample.Web/project.json b/samples/RoutingSample.Web/project.json index bdd39222cd..1a80f35437 100644 --- a/samples/RoutingSample.Web/project.json +++ b/samples/RoutingSample.Web/project.json @@ -1,12 +1,13 @@ { "dependencies": { "Microsoft.AspNet.Server.Kestrel": "1.0.0-*", - "Microsoft.AspNet.Server.WebListener": "1.0.0-*", "Microsoft.AspNet.Routing.Extensions": "1.0.0-*" }, + "compilationOptions": { + "emitEntryPoint": true + }, "commands": { - "web": "Microsoft.AspNet.Hosting server=Microsoft.AspNet.Server.WebListener server.urls=http://localhost:5001", - "kestrel": "Microsoft.AspNet.Hosting --server Microsoft.AspNet.Server.Kestrel --server.urls http://localhost:5000" + "web": "RoutingSample.Web" }, "frameworks": { "dnx451": { }, diff --git a/samples/RoutingSample.Web/wwwroot/web.config b/samples/RoutingSample.Web/wwwroot/web.config new file mode 100644 index 0000000000..9a0d90abf8 --- /dev/null +++ b/samples/RoutingSample.Web/wwwroot/web.config @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file