January 27th, 2011, 02:18 PM
Request.Form method in Classic ASP generates a generic error
I am unable to grab any form data using the Request.Form("item") method in Classic ASP. It generates a very generic error with no description. However, it works just fine in ASP.NET. (The problem also occurs with the Request("item") syntax.)
I don't have any problems with any other Request methods in Classic ASP.
This is a copy of sample code I wrote, which throws the error:
(Form Page: form.asp)
(Output Page: test.asp)
<form name="test" action="test.asp" method="post">
<input type="text" name="stuff" />
<input type="submit" name="submit" value="Try It" />
This is what I receive:
mytest = Request.Form("stuff")
<my path>/test.asp, line 2
Line 2 is the mytest = Request.Form("stuff") line.
Error Tracing from IIS:
HttpReason Internal Server Error
ErrorCode The operation completed successfully. (0x0)
This is the ASP entry in the applicationHost.config file:
<add name="ASPClassic" path="*.asp" verb="*" modules="IsapiModule" scriptProcessor="%windir%\system32\inetsrv\asp.dll" resourceType="Unspecified" requireAccess="Script" />
The server is IIS7.
Any help would be greatly appreciated.
January 27th, 2011, 02:41 PM
Fixed the problem on my own!
In the event someone else should experience this, setting the DefaultAppPool to Classic did the trick!