Date:  08/20/2006 10:10:00 PM Msg ID:  003124
From:  FoxWeb Support Thread:  003116
Subject:  Re: Script Mapping URL Problem
I'm not sure why you created a virtual directory in IIS for your images.  What's the virtual directory URL?  You can access the images without creating a virtual directory by setting the source to "/marketing4insurance/picts/mbm_zipcodes.gif".  In any case, as long as you are using an absolute URL (meaning, a URL that starts with a slash), then it makes no difference where you locate your script and what URL you use to access it.
Also, try the following URL: http://localhost/picts/mbm_zipcodes.gif.  Can you see the image?  If not, then the script code you posted cannot be working.  In this case, make sure to paste the exact (working) script code in your response.

FoxWeb Support Team email

Sent by John Sullivan on 08/20/2006 09:56:33 PM:
All images are located in my web root which is:


This directory is set up as a virtual IIS directory

The scripts are located in a directory outside the web root. This directory is:


This directory is specified as my default program root in the Virtual Servers tab in the FoxWeb Control Center.

I have tried every configuration of the script possible and still cannot get the image to view with the script located outside the web root.

Note: If I place the script in the web root and then change the Virtual Server tad check box to "Use Web Server's Direct" the image displays as expected.

The Foxweb DLL is located in the C:\Inetpub\Scripts directory. The FWX extention is correctly mapped to that DLL. The FoxWeb program is installed in its default directory.

What am I doing wrong? The script is as simple as I can make it. I have tested every scenario possible.

I will try any ideas you have. Thanks for your help.

John Sullivan

Sent by FoxWeb Support on 08/20/2006 07:11:46 PM:
You did not provide us with the location of your Web root, FoxWeb Program Root, directory where the images are located and directory where your scripts are located in each example.  This makes it harder to be certain of the problem, but I will try.
I assume that your script code remains the same in both examples.  The code uses "/picts/mbm_zipcodes.jpg" for the image source, which means that your images must reside in the picts sub-folder of your web root.  In order for both scenarios to work, the scripts must remain in that location.  Even if you move your script ourside the web tree, the images must remain there.

FoxWeb Support Team email

Sent by John Sullivan on 08/20/2006 05:45:06 PM:
I am trying to get scripts located outside the web tree to work properly. The scripts run  but do not produce the expected browser output unless I place them in the web tree and then change the Foxweb  Control Center to reflect Use Web Server's Directory Mappings. Specifically, the image is outputted correctly when using script located in the web tree but not outputted when located outside the web tree.

I have read the Locating and Addressing Scripts many times but obviously I am missing something. Perhaps the following information will enable you to point me in the right direction.

Here is the setup. I used a simple Foxweb script and called it Zip_Test.Fwx. The script looks like this:

*** Foxweb Zip_Test.FWX TEST script*********************

** The testinfo is outputted so I know I am in the correct script
TestInfo = "this is test #5"
<title>Zipcode Search Page</title>
<img src="/picts/mbm_zipcodes.jpg" width="100%" Height="150">


Using the “Use Web Server's Directory Mappings” in the Foxweb Control Center and with the script located in the web tree, the following URL works.

http://localhost/Marketing4insurance/ZIP_test.FWX    (this works)

Storing the Foxweb script in the web tree allows the graphic to display as expected.


With  the “Use Web Server's Directory Mappings” UNCHECKED in the Foxweb Control Center, and placing the script in the directory specified in the Foxweb Control Center, the following URL DOES NOT WORK.

http://localhost/ZIP_test.FWX (This does not work – I reload the browser each time with a different test number to ensure the script recompiled and ran.)

I tried a variety of options for relative addressing and none works. These are:
<img src="\picts\mbm_zipcodes.jpg" width="100%" Height="150">
<img src="picts\mbm_zipcodes.jpg" width="100%" Height="150">
<img src=".\picts\mbm_zipcodes.jpg" width="100%" Height="150">
<img src="..\picts\mbm_zipcodes.jpg" width="100%" Height="150">
<img src="/picts/mbm_zipcodes.jpg" width="100%" Height="150">
<img src="picts/mbm_zipcodes.jpg" width="100%" Height="150">
<iimg src="../picts/mbm_zipcodes.jpg" width="100%" Height="150">
Do you have any suggestions on what to try next?

John Sullivan