Reacting to new Hosting API
This commit is contained in:
parent
1c0996c625
commit
f49c218bdf
|
|
@ -5,6 +5,7 @@ using System;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using Microsoft.AspNet.Antiforgery;
|
using Microsoft.AspNet.Antiforgery;
|
||||||
using Microsoft.AspNet.Builder;
|
using Microsoft.AspNet.Builder;
|
||||||
|
using Microsoft.AspNet.Hosting;
|
||||||
using Microsoft.AspNet.Http;
|
using Microsoft.AspNet.Http;
|
||||||
using Microsoft.AspNet.Routing;
|
using Microsoft.AspNet.Routing;
|
||||||
using Microsoft.Extensions.DependencyInjection;
|
using Microsoft.Extensions.DependencyInjection;
|
||||||
|
|
@ -69,5 +70,15 @@ namespace AntiforgerySample
|
||||||
|
|
||||||
app.UseRouter(routes.Build());
|
app.UseRouter(routes.Build());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static void Main(string[] args)
|
||||||
|
{
|
||||||
|
var application = new WebApplicationBuilder()
|
||||||
|
.UseConfiguration(WebApplicationConfiguration.GetDefault(args))
|
||||||
|
.UseStartup<Startup>()
|
||||||
|
.Build();
|
||||||
|
|
||||||
|
application.Run();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,3 @@
|
||||||
|
{
|
||||||
|
"server": "Microsoft.AspNet.Server.Kestrel"
|
||||||
|
}
|
||||||
|
|
@ -1,38 +1,39 @@
|
||||||
{
|
{
|
||||||
"webroot": "wwwroot",
|
"version": "1.0.0-*",
|
||||||
"version": "1.0.0-*",
|
|
||||||
|
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"Microsoft.AspNet.Antiforgery": "1.0.0-*",
|
"Microsoft.AspNet.Antiforgery": "1.0.0-*",
|
||||||
"Microsoft.AspNet.Http.Abstractions": "1.0.0-rc2-16062",
|
"Microsoft.AspNet.Http.Abstractions": "1.0.0-*",
|
||||||
"Microsoft.AspNet.Http.Extensions": "1.0.0-*",
|
"Microsoft.AspNet.Http.Extensions": "1.0.0-*",
|
||||||
"Microsoft.AspNet.Routing.Extensions": "1.0.0-*",
|
"Microsoft.AspNet.Routing.Extensions": "1.0.0-*",
|
||||||
"Microsoft.AspNet.Server.Kestrel": "1.0.0-*",
|
"Microsoft.AspNet.Server.Kestrel": "1.0.0-*",
|
||||||
"Microsoft.AspNet.Server.WebListener": "1.0.0-*",
|
|
||||||
"Microsoft.AspNet.StaticFiles": "1.0.0-*",
|
"Microsoft.AspNet.StaticFiles": "1.0.0-*",
|
||||||
"Newtonsoft.Json": "7.0.1"
|
"Newtonsoft.Json": "7.0.1"
|
||||||
},
|
},
|
||||||
|
|
||||||
"commands": {
|
"compilationOptions": {
|
||||||
"kestrel": "Microsoft.AspNet.Hosting --server Microsoft.AspNet.Server.Kestrel --server.urls http://localhost:5000",
|
"emitEntryPoint": true
|
||||||
"web": "Microsoft.AspNet.Hosting --server Microsoft.AspNet.Server.WebListener --server.urls http://localhost:5000"
|
},
|
||||||
},
|
|
||||||
|
|
||||||
"frameworks": {
|
"commands": {
|
||||||
"dnx451": { },
|
"web": "AntiforgerySample"
|
||||||
"dnxcore50": { }
|
},
|
||||||
},
|
|
||||||
|
|
||||||
"publishExclude": [
|
"frameworks": {
|
||||||
"node_modules",
|
"dnx451": { },
|
||||||
"bower_components",
|
"dnxcore50": { }
|
||||||
"**.xproj",
|
},
|
||||||
"**.user",
|
|
||||||
"**.vspscc"
|
"publishExclude": [
|
||||||
],
|
"node_modules",
|
||||||
"exclude": [
|
"bower_components",
|
||||||
"wwwroot",
|
"**.xproj",
|
||||||
"node_modules",
|
"**.user",
|
||||||
"bower_components"
|
"**.vspscc"
|
||||||
]
|
],
|
||||||
|
"exclude": [
|
||||||
|
"wwwroot",
|
||||||
|
"node_modules",
|
||||||
|
"bower_components"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,9 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<configuration>
|
||||||
|
<system.webServer>
|
||||||
|
<handlers>
|
||||||
|
<add name="httpPlatformHandler" path="*" verb="*" modules="httpPlatformHandler" resourceType="Unspecified" />
|
||||||
|
</handlers>
|
||||||
|
<httpPlatform processPath="%DNX_PATH%" arguments="%DNX_ARGS%" forwardWindowsAuthToken="false" startupTimeLimit="3600" />
|
||||||
|
</system.webServer>
|
||||||
|
</configuration>
|
||||||
Loading…
Reference in New Issue