Indy TidHTTP and POST to ASP page problems

From: Anders Buch (dont_at_write.me)
Date: 10/26/04


Date: Tue, 26 Oct 2004 10:36:17 +0100

Hi

In need to post two values to an ASP page on IIS that looks like this
(simplified):

<%
...
 code to log the hit goes here
...
Response.Write ("CustNo Content : " & Request.Form("CustNo") & "<p>")
Response.Write ("Content Content : " & Request.Form("Content") & "<p>")
%>

I use Delphi 7 and Indy 9.0.15. Here is what I tried:

var
  idHTTP: TidHTTP;
  FormData: TIdMultiPartFormDataStream;
  ReturnText: string;
begin
  idHTTP:=TidHTTP.Create(nil);
  FormData:=TIdMultiPartFormDataStream.Create;
  FormData.AddFormField('CustNo','111');
  FormData.AddFormField('Content','222');
  ReturnText:=idHTTP.Post('http://mysite.com/somepage.asp',FormData);
  // Of course I use the right URL in my code :-)

IIS does receive my post but there are no values in the Form fields CustNo
and Content?

I am sure I must be missing something simple (or complicated :-)) as I am
quite new to HTTP and ASP.

Any help would be much appreciated. Thanks

Anders Buch
Denmark



Relevant Pages

  • Re: problem when executing asp in IIS 5.0
    ... You can probably get your site temporarily operational by using the IIS ... and let run both straight forward ASP and those ... Out-of-process" component is missing and I can't re-install it using the MS ... > and i test that i can run the html file ...
    (microsoft.public.inetserver.iis)
  • Re: dllhost
    ... It's just about 100% pure ASP with com objects. ... DLLHOST goes to 95-100% utilization and stays there indefinitely unless IIS ... > a simple HTML page serve or do they also hung? ...
    (microsoft.public.inetserver.iis)
  • Re: Accessing 32 bit COM components in 64 bit IIS
    ... CGIs, and ASP scripts onto a 64bit machine, and it just works after they ... The most confusing aspect of running 32bit app on a 64bit OS is that you ... System32 access is redirected, etc). ... we will be introducing the ability to configure IIS to run ...
    (microsoft.public.inetserver.iis)
  • Re: ASP Authentication on IIS 6.0 Windows 2003 Server 32bit help please
    ... when an ASP page is executed in IIS? ... site that requires a user to enter their domain account to access the ... the ASP script code ... I find that the .exe runs ...
    (microsoft.public.inetserver.iis.security)
  • Re: Serious problem in using COM in IIS
    ... introduces a "thread affinity" for your ASP session. ... and that's unlikely to be the thread you're on at the time (IIS ... otherwise i will set it to private and persistable ... >> variables defined in my ABC COM ...
    (microsoft.public.vb.general.discussion)