New Features in FoxWeb 4
Support for Windows Vista, 7, and 2008 Server
Several changes were required in many different areas in order to support newer versions of Windows.
Create AJAX Applications
PDF Creation and Distribution
The new fwPDF object makes it a snap to create and serve PDF files from your FoxWeb applications. It contains functionality that facilitates the translations of Postscript files to PDF format and takes care setting the HTTP headers required for transferring PDF files to Web browsers. New sample scripts illustrate this functionality.
The enhancements in this version give developers more control over authentication and make it easier to create elegant password-protected sites that vary their content and behavior, depending on the login status of each user.
- Added ability to instruct Auth.Authenticate to perform a silent authentication and return the result to the calling script. Can be used to present different content, depending on whether the user is logged in, or not.
- Added ability to pass userid and password as arguments to Auth.Authenticate. These arguments are used instead of any fields sent by the browser. This feature can be used to programmatically log users in after registration, without having them re-enter their userid and password.
- Added Auth.Result, Auth.FailedUserId and Auth.FailedPassword properties, which can be used in fw_exit.prg to perform custom actions in the case of unsuccessful login attempts, such as send email to the administrator, maintain an authentication failure log, lock user accounts for a period of time, etc.
Error Handling and Error Logging Improvements
Some of the enhancements in this area make it much easier for ASPs and other large organizations to keep separate error logs for each virtual host.
- Error log captures server name as a separate field. Can be used to filter errors by host name.
- Ability to write in separate error log tables, located in the program root of each virtual server. Can be used to filter errors by host name.
- User interface improvements in fwAdmin.fwx error log viewer.
- Ability to select an implementation-specific error log in fwAdmin.fwx.
- Error handler can return a status of "500 Server Error" instead of "200 OK".
- Error handler returns the robots noindex HTTP header to prevent indexing of error messages by search engines.
- Improved formatting of error message HTML output.
- Response.Clear does not only clear the output buffer, but also clears any unsent HTTP headers, such as the status, cookies and the content- type.
- Added Request.ScriptParams property, which is populated with the part of the URL that is after the script name, but before the query string. This can be useful for creating parameterized pages that are indexed by certain search engines that do not support query strings.
- Added Server.JSUnescape method.
New Features in FoxWeb 3
In addition to a large number of performance and compatibility improvements, FoxWeb 3 offers the following new features:
FoxWeb Administration Script
The new FoxWeb Administration script (fwAdmin.fwx) provides a number of functions, including System Information, a link to the Error Log Viewer, channel status, the ability to compile scripts on the server even if it's running with the VFP Run-Time DLL, and the ability to run code interactively on the server.
Script Compilation Enhancements
Up until version 2, FoxWeb required scripts to be compiled by a full version of VFP. Users running their servers with the VFP Run-Time DLL were required to manually compile their scripts on a different computer using a largely manual process whenever they made changes to the source code. The new version removes this restriction for servers running VFP 6 Service Pack 3 and above. It also provides a variety of tools that aid administrators in compiling scripts both locally and remotely.
- Added ability to compile scripts while running FoxWeb with VFP Run Time DLL if using VFP 6 Service Pack 3 and above. FWX and PRG files specified in a URL, or called via Server.Execute and Server.Transfer will be compiled automatically, while scripts called with the DO command, or using a function call functions must be compiled with the new fwCompile object. When using the full VFP product all scripts will be compiled automatically, regardless of how they were called.
- Compile Scripts function in FoxWeb Administration script facilitates batch compilation of fwx and prg scripts on the server. This function is particularly useful for servers that are running with the VFP run-time DLL.
- New fwCompile object allows batch compilation of whole directory trees, using wildcard patterns. Both PRG and FWX files are supported.
Send Email with the ASPSmartMail SMTP Component
FoxWeb 3 includes the ASPSmartMail is an SMTP control, which can be used to send e-mail from FoxWeb scripts and other programs that support COM controls.
- Added support for sessions on browsers that have cookies turned off.
- Added SessionNoCookies registry entry, which if set to 1 will force FoxWeb to always look for the session id token in the query string.
Authentication object enhancements
- Added ability to store passwords in encrypted format, via the Auth.EncryptPassword property. Use Server.HashMD5 to create passwords.
- Added ability to perform case sensitive authentication via the Auth.CaseSensitive property.
- Added Auth.AdminAuthenticate and Auth.AdminLogout methods, which authenticate users against the administrator User ID and Password. The administrator User ID and Password settings can be set in the FoxWeb Control Center and are used by the new FoxWeb Administration Script. Developers can create additional administration scripts and use the Auth.AdminAuthenticate and Auth.AdminLogout methods to protect them.
Improved Channel Management
- Increased maximum number of channels from 9 to 30. Please see updated notes on recommended number of channels.
- Improved channel management. Channels are killed by a separate thread, allowing the Channel Controller to continue with other tasks.
- The priority with which channels are assigned has changed. In the past, FoxWeb would assign the lowest non-busy channel. The new algorithm also takes into account whether channels are still sending data to browsers. Priority is now given to the channel with the fewest active connections. In case of ties, the lowest channel number wins. Active connections are network connections, on which the channel is still returning data. In order to improve performance, FoxWeb channels become available as soon as execution of a script is completed. It is possible for a channel to be available to execute a new request, while it is still returning data for one of more previously-executed requests. This change will prevent "FoxWeb Channel Stopped Responding" errors on busy servers serving sizable content to browsers with slow connections.
- Channel Status window and output of show_channels internal script display the number of active connections for each channel. This column indicates the number of requests for which the channel is still sending data back to client browsers.
- Output of show_channels internal script displays two additional columns: Last Script is the name of the last script that was received by the channel. Last Script Time is the time that the channel received the last request.
- Added setting for total Buffer Memory Size value used by FoxWeb channels.
- Ability to view line number and content in error log when running under run- time DLL if available.
- Fixed formatting of memvar dump in error log when running under run-time DLL.
- FoxWeb setup program was re-written from scratch, using Windows Installer (MSI) technology.
- More robust method of setting up .fwx script mapping for IIS.
- Automatic setup of application extensions, which are required for IIS 6 and above (Windows 2003).
- Option to switch version of VFP without having to reinstall FoxWeb.
- Added Reset After Errors configuration option. If this option is disabled, then FoxWeb does not reset the current channel after script a error. Older versions of FoxWeb always used to reset channels after an error. This will prevent "FoxWeb Channel Stopped Responding" errors for busy servers, serving large output buffers to browsers with slow connections.
- Added SharedTempDir registry entry, which can be used to specify a network location for the session table. Only useful for load-balanced server farms.
- Added Request.StartTime and Request.StartSeconds methods.
- Running fwserver.exe returns the version of VFP it was compiled with.
- Increased maximum number of memory variables (MVCOUNT) from 2,048 to 4,096.
- Minor user interface enhancements in FoxWeb Control Center.
- Non-script errors can return HTTP status 500 (Internal Server Error) if the StubErrorStatus500 registry entry is set to "1".
- Status window uses colors to represent the status of FoxWeb channels.
- Added description to the FoxWeb service entry in the Control Panel.
- Channel status window is now resizable.
© Aegis Group