Issue #1311: Samples should be able to run on Mono.
Fix: Adding support for Kestrel server and fixing the paths for mono.
This commit is contained in:
parent
5119d16b64
commit
99ad37fa99
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
|
|
@ -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": {
|
||||
|
|
|
|||
Loading…
Reference in New Issue