IIS-HttpPlatformHandler-Kestrel app not processing POST's #16
Description
In reference to an app that I just refactored (steps listed here) from IIS-Helios (beta7) to IIS-HttpPlatformHandler (beta8), GET is processed properly (e.g., the Contact view loads) ...
[HttpGet]
[Route("/contact/{d?}")]
public IActionResult Index(string d, Visitor visitor = null) { ... }
... but POST is resulting in a 404 (e.g., POST to the Contact controller fails) ...
[HttpPost]
[Route("/contact/{d?}")]
[ValidateAntiForgeryToken]
public async Task<IActionResult> Index(Visitor visitor) { ... }
IIS is seeing the POST, from the IIS log ...
2015-10-16 17:33:14 10.119.28.25 POST /contact - 8001 - 68.225.66.164 Mozilla/5.0+(Windows+NT+10.0;+WOW64)+AppleWebKit/537.36+
(KHTML,+like+Gecko)+Chrome/46.0.2490.71+Safari/537.36
http://www.~~~~~~~~.com:8001/contact 404 0 0 2007
The HttpPlatformHandler log (stdout.log
) is up but not showing anything (can I enable some more detailed tracing here? Also a bit curious about why it says "Now listening on: http://localhost:33176" when this is on the VM/IIS?) ...
Hosting environment: Production
Now listening on: http://localhost:33176
Application started. Press Ctrl+C to shut down.
<end of entries>
@davidfowl had me remove the --server.urls argument from the web.cmd
command to get the app responsive (to GET's anyway), resulting in this ...
"commands": {
"web": "Microsoft.AspNet.Hosting --server Microsoft.AspNet.Server.Kestrel"
},
Nothing changed in the app between going from Helios to HttpPlatformHandler. POST works under IIS Express locally but is failing on the VM under IIS-HttpPlatformHandler.
Packages:
"Microsoft.AspNet.Diagnostics": "1.0.0-beta8",
"Microsoft.AspNet.Diagnostics.Entity": "7.0.0-beta8",
"Microsoft.AspNet.Hosting": "1.0.0-beta8",
"Microsoft.AspNet.Mvc": "6.0.0-beta8",
"Microsoft.AspNet.Mvc.TagHelpers": "6.0.0-beta8",
"Microsoft.AspNet.Server.Kestrel": "1.0.0-beta8",
"Microsoft.AspNet.StaticFiles": "1.0.0-beta8",
"System.ComponentModel.TypeConverter": "4.0.1-beta-*",
"System.Net.Http": "4.0.0-beta-*",
"System.Net.Security": "4.0.0-beta-*",
"System.Net.Sockets": "4.0.10-beta-*",
"Microsoft.AspNet.Antiforgery": "1.0.0-beta8",
"System.Runtime.Serialization.Primitives": "4.0.10-beta-*",
"WindowsAzure.Storage": "5.0.3-preview",
"Microsoft.Framework.Configuration": "1.0.0-beta8",
"Microsoft.Dnx.Compilation.CSharp.Abstractions": "1.0.0-beta8",
"Microsoft.VisualStudio.Web.BrowserLink.Loader": "14.0.0-beta8"
Runtime:
dnx-coreclr-win-x64.1.0.0-beta8
Server:
Azure VM: WS 2012 (not R2), IIS 8