diff --git a/samples/MvcSample.Web/Startup.cs b/samples/MvcSample.Web/Startup.cs index 529cc9606f..c3b0c3708b 100644 --- a/samples/MvcSample.Web/Startup.cs +++ b/samples/MvcSample.Web/Startup.cs @@ -1,4 +1,5 @@ using System; +using System.IO; using Microsoft.AspNet.Builder; using Microsoft.AspNet.Mvc; using Microsoft.AspNet.Mvc.Razor; @@ -21,8 +22,9 @@ namespace MvcSample.Web { app.UseFileServer(); #if ASPNET50 + // We use Path.Combine here so that it works on platforms other than Windows as well. var configuration = new Configuration() - .AddJsonFile(@"App_Data\config.json") + .AddJsonFile(Path.Combine("App_Data", "config.json")) .AddEnvironmentVariables(); string diSystem; diff --git a/samples/MvcSample.Web/project.json b/samples/MvcSample.Web/project.json index ada8920f2c..d79e8587d7 100644 --- a/samples/MvcSample.Web/project.json +++ b/samples/MvcSample.Web/project.json @@ -3,6 +3,7 @@ "warningsAsErrors": true }, "dependencies": { + "Kestrel": "1.0.0-*", "Microsoft.AspNet.Mvc": "6.0.0-*", "Microsoft.AspNet.Server.IIS": "1.0.0-*", "Microsoft.AspNet.Server.WebListener": "1.0.0-*", @@ -10,7 +11,10 @@ "Microsoft.DataAnnotations": "1.0.0-*", "Microsoft.Framework.ConfigurationModel": "1.0.0-*" }, - "commands": { "web": "Microsoft.AspNet.Hosting server=Microsoft.AspNet.Server.WebListener server.urls=http://localhost:5001" }, + "commands": { + "web": "Microsoft.AspNet.Hosting server=Microsoft.AspNet.Server.WebListener server.urls=http://localhost:5001", + "kestrel": "Microsoft.AspNet.Hosting --server Kestrel --server.urls http://localhost:5000" + }, "frameworks": { "aspnet50": { "dependencies": {