Entry
Delphi: Internet: Intraweb: Application: Create: What are steps to create Intraweb application?
Oct 8th, 2003 13:44
Knud van Eeden,
-----------------------------------------------------------------------
--- Knud van Eeden - Monday 14 July 2003 - 08:44 pm -------------------
Delphi: Internet: Intraweb: Application: Create: What are steps to
create Intraweb application?
---
Intraweb components are by default present in e.g.
Delphi v7 Professional and Delphi v7 Studio.
Otherwise you can download an evaluation version from
http://www.atozed.com
---
You can create your Intraweb applications to run as:
1. Stand alone application (run the .exe and type the URL in your
webbrowser)
2. Windows service (install the service, run your .exe, and type the
URL in your webbrowser), or Linux Daemon when using Kylix.
3. ISAPI dll (or Apache DSO)
---
All the time this is basically a system using a (built in) web server,
which runs some application.
So you can run it:
1. on your local computer, and access it via your web browser: run the
.exe, open your browser and type the address
http://127.0.0.1:<port>
or also
http://localhost:<port>
2. on your local network, and access it via any other webbrowser of the
connected computers: run the .exe on one of the computers in the
network, open any of the browsers on the other connected computers
and type the address
http://<IP address of the computer on which the .exe runs>:<port>
3. via the Internet, but then the computer on which it runs has to have
a permanent connection to the Internet, and the possibility to run
the Intraweb application (so your provider must deliver or the
Windows platform when using Delphi, or the Linux Intel platform when
using Kylix. But most of the providers use the UNIX platform, so
there it will not work) If you think you should like to install it
at your service provider, contact them for the possibilities (or
check the http://www.atozed.com site for other possible providers
which give this possibility. There do not seem any real cheap
solutions available in that case, with prices possibly in the range
of $20 per month or more, when I checked)
---
Intraweb applications can be completely programmed in Delphi source
code, which is then converted to JavaScript, CSS and HTML.
---
You run this Intraweb application (e.g. the standalone .exe which you
created after compiling your Intraweb application in Delphi) on your
local computer, or via a web browser (while your .exe, or Windows
service + .exe, or Windows webserver + ISAPI dll, is running on the
host computer) by typing the URL:
http://<IP address of the computer on which it is running>:<port on
which it is running>
---
To check your IP address, type
ipconfig
on the MSDOS command line, look for the name of your network card via
which the network connection takes place.
---
The IP address when running and or testing the applications on your own
computer is per definition always:
127.0.0.1
or similar
localhost
---
Stand-alone Intraweb projects have a built-in HTTP web server, and
therefore do not need Internet Information Server, Apache, or any other
Web server. They can run independently of them, because they use in
general another port (e.g. ISS runs http on port 8080, while you have
chosen that your Intraweb program runs on for example port 4400).
---
To create a new IntraWeb stand alone application:
Steps: Overview:
1. -run the program Delphi
2. -select from menu option 'File'
3. -select from list 'New'
4. -select from list 'Other'
5. -select tab 'Intraweb'
6. -double click on icon 'Stand Alone Application'
7. -Build your application using the components
(see Intraweb palette)
1. If not visible, from the forms select 'FormMain'
(via for example <SHIFT><F12>)
2. Enlarge it a bit to see it better
3. Goto for example to palette 'IW Standard'
4. Double click on the components you want to add
8. -Compile the application in Delphi
9. -In the server dialog box:
1. -select from menu option 'Run'
2. -select from list 'Execute' (or press <F9>, or click on the
corresponding first menu icon)
10. -To deploy:
-If you have created a stand alone application, this will have
created a .exe containing a built-in webserver.
Thus if you type the name of that .exe (e.g. myproject.exe), it
will automatically start that executable.
-You need to have the web server running, in order to do some
dynamic changes on your page. If you should try to copy the
source code of your Intraweb HTML page (e.g. by right clicking on
that HTML page, 'view source', and then save it, after which you
upload it to your website, it will only be static, and not
changing).
-To run it on your local machine:
1. run the executable (your Intraweb .exe, as generated
after compiling your Intraweb application in Delphi)
2. type in your browser the ipaddress:port to access it
e.g. Suppose your Intraweb .exe is running on your own
machine, type in your browser's URL:
http://127.0.0.1:4383
or
http://localhost:4383
Note:
the port number 4383 is subject to change. You see the correct
number when you start the .exe, in the small server panel
which comes then up. You can force a fixed port number by
following the steps as described further below.
3. To test it on another machine on the network or on the
Internet
-make sure that your Intraweb executable is running (e.g. by
typing its .exe name on the command line or double clicking
on its filename in Explorer, on the remote machine
-open your webbrowser, and type the IPaddress of the remote
machine:<port on which that Intraweb server is running>
e.g. execute it
(e.g. type
reservation.exe
in the ..\delphi\intraweb\reservation
directory) on my own laptop host computer,
make sure you have a network connection, e.g. in the
other client computer type
ping <IP address of the host computer>
for example:
ping 192.168.0.3
and be sure you get a valid reply, confirming you have
a connection, then type in the other network computer
browser URL the following:
http://IPaddress:port
e.g. type
http://192.168.0.3:4383
---
Note:
The port (e.g. 4383) on which to connect, changes every
time you restart the executable (e.g. reservation.exe),
this is the default. So this new port number will have
to be communicated to the other computer owner (e.g. by
sending an e-mail, or by putting this on a centrally
accessable web page, e.g. on
http://www.yourwebsite.com)
If you want to fix the port number to some constant
chosen by you, you will have to go to the
servercontroller.pas program using Delphi (which is
part of your Intraweb project in Delphi), and in the
left pane properties change the attribute 'Port' from
the default '0' to your portnumber (e.g. 4400), then
recompile your project. From now on this is assumed
this has been done, so the fixed port on which your
Intraweb application runs is 4400.
-Running your .exe as a Windows service.
The following will per definition only work in Windows
NT/2000/XP, (as Windows services are not defined or
implemented in Windows 95/98/ME):
if you do not want to have the executable icon on your
taskbar (e.g. reservation.exe), you can start it for example
as a Windows service (so running as a terminate stay resident
application in the background), type in an MSDOS box:
<your Intraweb executable name> -install
e.g.
reservation.exe -install
You should then see a Windows message box, saying
'service installed successfully'.
Note:
1. You will have to start this Windows service (e.g. shown as
'My Intraweb Application' (this name you can also set in the
left pane of the servercontroller.pas file, attribute
'Description' (press <SHIFT><F12>, then choose
'IWServerController') in Delphi. E.g. change it to
'Intraweb: reservation' and recompile) in the list of
Windows XP services. Goto the Windows control panel,
administration, then services, search the application in the
list of services, and 'start' the application (by double
clicking on the name, then clicking on 'Start')).
2. You must then after that run your Intraweb executable .exe
again (or put the program e.g. in your Windows startup
folder to start it automatically, or put it in a batch file
or similar)
e.g. type
reservation.exe
or else your browser will not show results if you type the
IPaddress:port address
3. But as a result of running your executable again, you will
now not see this program again on the Windows taskbar on the
bottom of the screen.
If you then open your web browser and type
http://ipaddress:port
Note:
type 'http://' in the beginning of your URL, or else you
might see as a reaction 'Page not found' in your browser. (So
type e.g. http://127.0.0.1:4400 and not 127.0.0.1:4400 as
this informs your browser clearly it is regarding the http
protocol)
---
-To remove that Windows service (e.g. 'My Intraweb
application'), type:
<your executable name> -uninstall
e.g.
reservation.exe -uninstall
You should then see a Windows message box, saying
'service uninstalled successfully'.
-You will for example need to uninstall that Windows service
when you want to recompile your changed intraweb application
(e.g. reservation.dpr) in Delphi, while the Windows service
is still running. Otherwise you might get fatal errors [Fatal
error 'Could not create output file] when compiling (again)
in Delphi.
-Note: remember to if necessary afterwards when reinstalling,
to restart this service in your Windows control panel,
administrative tasks, services.
---
To test if the Windows service is working correctly: you can
further type in an MSDOS box:
telnet <IP address> <port>
to test the connection.
e.g. when testing on the same computer on which your Intraweb
.exe application is running as a service, type on an MSDOS
command line:
telnet 127.0.0.1 4400
You should see e.g. 'Connecting to ...', then possibly a
blank screen as a reply (and not a 'Connect failed'
connection message, as this will indicate that the service
is not running correctly)
---
If you get 'Intraweb: Reservation Error': Session not found.
Session may have expired. Then just rerun your Intranet
application (e.g. by typing http://<IPaddress>:port in your
browser)
---
This has been tested and worked OK on
-Microsoft Windows XP Professional
-Delphi v7
-Intraweb v5.0.43,
on a local network and also on a stand alone machine.
---
---
Internet: see also:
---
http://www.faqts.com/knowledge_base/view.phtml/aid/23240/fid/175
---
http://www.delphizine.com/productreviews/2002/06/di200206ps_p/di200206p
s_p.asp
---
Intraweb: Internet: Main page
http://www.atozed.com
---
Intraweb: Documentation
http://www.atozedsoftware.com/intraweb/Download/index.iwp
---
Delphi: Internet: Intraweb: Application: Create: Simple: How create
apartment reservation program?
http://www.faqts.com/knowledge_base/view.phtml/aid/23240/fid/175
---
Delphi: Internet: Intraweb: Application: Create: What are steps to
create and run ISAPI dll in IIS?
http://www.faqts.com/knowledge_base/view.phtml/aid/23269/fid/175
---
Delphi: Internet: Browser: How make Delphi .exe accessible from
Microsoft Internet Explorer browser?
http://www.faqts.com/knowledge_base/view.phtml/aid/25246/fid/175
-----------------------------------------------------------------------