Can't get this web application to work.
From: L. Healy (L.Healy_at_occpsy.demon.co.uk)
Date: 10/31/03
- Next message: Ian Robinson: "Re: Which database?"
- Previous message: Dodgy: "Re: IP Popup Ads"
- Next in thread: Maarten Wiltink: "Re: Can't get this web application to work."
- Reply: Maarten Wiltink: "Re: Can't get this web application to work."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Fri, 31 Oct 2003 12:24:05 +0000
Hi,
I think this is correct place to post this, I can't find any Delphi
Internet specific groups.
I am toe dipping with Internet programming for the first time, and
working through an example in an old Delphi 3 book I have, which is
generally excellent. I don't think anything I am trying to do with D6 is
obsolete but I am having problems.
I have complied the following Web Server Application as an ISAPI/NSAPI
dll application. I am posting all the code so you can see what I have
done :
===
unit Unit1;
interface
uses
SysUtils, Classes, HTTPApp;
type
TCurrentTimeDisp = class(TWebModule)
procedure CurrentTimeDispDefaultActionAction(Sender: TObject;
Request: TWebRequest; Response: TWebResponse; var Handled:
Boolean);
private
{ Private declarations }
public
{ Public declarations }
end;
var
CurrentTimeDisp: TCurrentTimeDisp;
implementation
{$R *.DFM}
procedure TCurrentTimeDisp.CurrentTimeDispDefaultActionAction(
Sender: TObject; Request: TWebRequest; Response: TWebResponse;
var Handled: Boolean);
begin
Response.Content := '<H1>Hello</H1> <HR>' +
'The Current Time is '+
TimeToStr(SysUtils.Time);
end.
===
Now when I post it to the web server I am experimenting with, and type
in the URL ......./xyz.dll
the browser insists on downloading it and asking what I want to with it.
According to the example it should just run within the browser and show
the time.
I have set the permissions properly. But no joy. Does anyone have any
useful observations ? Sorry if this is a stupid question but I have
never tries and web programming before apart from a tiny bit of cgi. I
dont even know if it is a Delphi problem, or a server problem.
Thanks
Liam Healy
- Next message: Ian Robinson: "Re: Which database?"
- Previous message: Dodgy: "Re: IP Popup Ads"
- Next in thread: Maarten Wiltink: "Re: Can't get this web application to work."
- Reply: Maarten Wiltink: "Re: Can't get this web application to work."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|