I built a Custom 404 CMS system in .NET 3.5, and while posting data works locally in IIS 5.1 and 6.0, it does not work on the production IIS 6.0 server. I compared the IIS 6.0 site settings item by item, and they are nearly identical, with the only differences not mattering.
I verified that the form is POST-ing to "http://domain/folder/folder/page.resource" in each case (code is in SVN) and that no redirects occur when submitted (I was throwing exceptions to make sure). Some debug info by server:
IIS 5.1 (my computer, works):
ServerVariables["REQUEST_METHOD"]="POST"
Request.TotalBytes = 1600
Request.QueryString.Count = 1 (NOTE: contains "404;http://domain:80/folder/folder/page.resource" in each case)
Request.Form.Count = 109
IIS 6.0 (test server, works):
ServerVariables["REQUEST_METHOD"]="GET" (NOTE: IIS 6.0 reads this as "GET" instead of "POST")
Request.TotalBytes = 1600
Request.QueryString.Count = 1
Request.Form.Count = 109
IIS 6.0 (production server, does not work):
ServerVariables["REQUEST_METHOD"]="GET"
Request.TotalBytes = 0 (NOTE: should be ~1600)
Request.QueryString.Count = 1
Request.Form.Count = 0 (NOTE: should be 109)
Does anyone have any ideas? I have read about POST data not being submitted in IIS 7.0 for 404 pages, but not in 6.0. My form is in this format:
<form id="GolfRegistration" name="GolfRegistration" method="POST" action="/folder/folder/page.resource" onSubmit="return CalculateAmount();">
<input type="button" value="Submit" onClick="if(ValidateInput()){submit(GolfRegistration);}">
</form>
For IIS 5.1 only, I setup the .resource extension in "IIS > Website > Properties > Home Directory tab > Configuration button > Add" to work with GET, HEAD, and POST. This prevents me from getting 405 errors when submitting.
Edit: I changed the POST to GET and in all 3 cases it submitted the data correctly, so it is not a form problem. Unfortunately I cannot pass the variables (there are 109) in the querystring.