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,21 +1,22 @@
|
||||||
{
|
{
|
||||||
"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"
|
||||||
},
|
},
|
||||||
|
|
||||||
|
"compilationOptions": {
|
||||||
|
"emitEntryPoint": true
|
||||||
|
},
|
||||||
|
|
||||||
"commands": {
|
"commands": {
|
||||||
"kestrel": "Microsoft.AspNet.Hosting --server Microsoft.AspNet.Server.Kestrel --server.urls http://localhost:5000",
|
"web": "AntiforgerySample"
|
||||||
"web": "Microsoft.AspNet.Hosting --server Microsoft.AspNet.Server.WebListener --server.urls http://localhost:5000"
|
|
||||||
},
|
},
|
||||||
|
|
||||||
"frameworks": {
|
"frameworks": {
|
||||||
|
|
|
||||||
|
|
@ -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