Step 3 - Finish and test the Server
The final step of the Wizard asks you to click Finish to run the configuration process. Let 'er rip!
Once it's done you need to do the following:
- Start the FoxPro Server (
- Start up the Web Server (if running IIS Express)
- Open up a Web Browser
After the setup program is done it'll automatically start the server for you and run as a standalone application out of the FoxPro IDE.
If you later need to start the server explicitly from a cold start follow these steps:
Use the WC Desktop Shortcut
Web Connection creates a shortcut on your desktop to start Web Connection. I highly suggest you use the shortcut or if one wasn't created that you create one manually as it sets the appropriate paths to find the support libraries. The short cut starts Web Connection the proper folder and sets path dependencies via the referenced
config.fpwon the startup link.
If the shortcut didn't make it or you're the kind of person that likes to type paths you can also do the manual steps:
Start Visual FoxPro
CD c:\wconnect(or wherever you installed Web Connection)
SET PATH TO ".\Classes" ADDITIVE
The key is to make sure paths are set. At minimum you'll want to have FoxPro include
.\classes folder as it contains all the Web Connection source files needed to run an application. You should always make sure that any Web Connection application references the
Once FoxPro is up and paths are set use:
Launch.prg opens the Web Browser and if running IIS Express ensures that it is running. Alternately you can also launch the FoxPro Server directly with:
to run the sample application server. This server houses the simple demos, the Message Board, WebLog and MusicStore samples all from a single server.
Once you do this the server form pops up:
As requests come in they show up in the server window's output pane to give you an idea of what's happening. You see the time, the script name and the elapsed time in seconds for the request.
Click on the Status button to see the status information of the server that should display some of the information that you specified during the Wizard operation:
You can make additional configuration changes on this status form later on as well as retrieve information about individual requests.
Make sure your Web Server is either already running or you start it explicitly. There are a number of different ways to run your Web Application.
If you're using full IIS the Web Server should already be running as it runs as a service. You can use the following from the commandline to check and restart IIS if it's not running already:
REM Recylce if already running, otherwise start IIS IISRESET REM Explicitly stop and start IIS IISRESET /STOP IISRESET /START
Next navigate to:
Again on first launch this will be automatic. You can also click on the Web Connection Server's status window Browse Site button:
The value for this is configurable in
wcdemo.ini and the
Unlike full IIS, IIS Express has to be started manually. You can easily do this using the Web Connection console.
From the Web Connection install folder inside of the FoxPro IDE:
DO CONSOLE WITH "IISEXPRESS"
This brings up an IIS Express launch dialog with a folder and port. In most cases you can just press
Enter to accept the defaults which brings up the Web Browser at:
with the sample application loaded.
If you plan on using IIS Express you might want to change the home url from
http://localhost:7000 or whatever port you chose in
[Main] REM IIS REM HomeUrl=http://localhost/wconnect REM IIS Express HomeUrl=http://localhost:7000
The next step is to fire up your Web Browser and access the demo page. If you chose the default install options you should now be able to go to:
and access the Web Connection demo page. If this doesn't work please check the Troubleshooting section.
Scroll down to the first request Hello World with Web Connection and run that - it's a very simple page that spits back some basic status information and just tells you the app is working.
If everything is working OK you should get a response page almost immediately that says Hello World from Visual FoxPro! followed by additional information about some of the server variables exposed by the server.
If this didn't work please see the setup troubleshooting topic.
Otherwise you're in business! Go ahead and browse around the demo page and check out some of the links. Note that most requests have a Show Code link on the bottom of the page that lets you quickly review the Visual FoxPro code that drives the request.
If you flip back to the Visual FoxPro instance that we started up at the beginning of this topic you'll find that there is now some request information in it like this:
00:07:33 wwDemo~ShowImage - 0.022 00:18:26 testpage.wwd - 0.040
Each request that hits the server shows in the main window along with the time that it took to run. At the same time the request gets logged into a log file where you can review and summarize the incoming requests. You can access this log file from the admin page at http://localhost/wconnect/admin.asp and the Show Web Connection Request Log request.
The admin page allows a number of administrative tasks from server monitoring to setting configuration options remotely over the Web to changing operational modes of the server. It's a good idea to shortcut this page in your Favorites list.
Comment or report problem with topic