WebHub Object Pascal Components

StartEXE deprecated v3.240
StartEXE is deprecated. Use Launch instead.
StartEXE now calls Launch instead of WinExec and works on Windows 10.
Source: ucShell.pas
LongInt v3.240
LongInt changed to FixedUInt throughout TPack, except in a few cases (txtGridVCL.pas) where the declaration is controlled by the VCL.
SendFile v3.240
TwhListResponse.SendFile no longer supports sending partial files via comma in the "file spec".
ZaphodsMap: D17 to D23, FPC3 v3.240
The aim for ZaphodsMap is now to support D17 to D23 plus FreePascal 3.0. Support for Delphi Dot Net has been dropped.
DUnit tests pass for NativeXml and ZaphodsMap for D17 to D23 as of WebHub v3.240, 13-Dec-2015. FPC3 support is pending.
EMail v3.240
Unused code for Delphi D16 and earlier has been removed from webMailV and related units. Indy is used for email now.
The CC: and BCC: prefixes are no longer added to distribution lists. Those were required by the original email subsystem as written by HREF Tools. They are not required by the Indy implementation.
Parentils are supported for expansion within the Subject field only.
Allowing for slower service start v3.240
Services taking more than 3.5 seconds to start had been considered faulty by TtpProject. This is no longer the case. As long as the net start syntax is correct, there is no longer a time limit on startup. If you wish to see detail on this, add LogTpProject to your list of compiler defines.
Win2003, WinXP phased out v3.241
In TPack, the IsProcessRunning function no longer supports Win2003 and WinXP. This is used by WebHub core.
Main panels appear v3.242
There was a problem in v3.241 only where the main panel stayed empty. This has been fixed. If you want to patch v3.241, edit utMainFc.pas line 181; remove 'not' from the if expression; recompile.
Icons loaded better v3.242
The syntax has been changed for loading icons for the various states supported by WebHub: A_MAINICON, STOPPED, RESTORED, etc.
See source in TPack unit: utTrayFm.pas
Caption no longer reports 'SUSPENDED'v3.242
The code that changed the application caption based on whether the EXE was processing a request has been trimmed to a minimum. There is no longer an attempt to include the word SUSPENDED; this was relevant in WebHub v2. For WebHub v3, Cover an AppID if you wish to take it offline.
See source: whgui_Menu.pas
Avoid A/V in PREVENTGUI modev3.243
A core fix has gone into TPack unit updateOK.pas, to avoid an access violation during Destroy -- only when compiled with PREVENTGUI.
WebHub PageErrors v3.245
If there are any errors found during page creation, they are logged in a single statement (rather than in a series of statements, as was done previously). The messages are logged as a Warning because, especially for notes about undefined stringvars, you may have a reason for the lack of data. To control this, you can set pWebApp.Debug.SilentUnrecognizedExpressions to True.
Eval/Lite License Violation v3.245
If usage outside the limits of the evaluation or lite license is detected, some details will be logged as errors to CodeSite if available.
GetVersionDigits: on arbitrary file v3.245
You can optionally obtain the version details for an arbitrary filespec, not just for the currently running DLL or EXE. See source in tpack ucVers.pas.
utWinMailslot no longer shippingv3.245
This unit has been removed from TPack: utWinMailslot.pas
TwhdbListBox: use DataSet property v3.245
TwhdbListBox.DataSource property had been deprecated and is now unsupported. Use the DataSet property.
icon: use default resource name v3.246
LoadIconResource automatically loads MAINICON when A_MAINICON not found
MAINICON is the icon name used by the Delphi IDE. A_MAINICON can be used to override the default.
WebMailForm v3.246
Parentils are respected around all fields in the application-level XML for webmailform now. Previously, only the Subject field supported expansion within parentils.
non-gui google sitemap generation v3.246
New datamodule: whsample_dmGoogleSitemap.pas can be used when you do not want to instantiate a form but still want to generate a sitemap based on the WebHub page definitions.
The xsd date for the application-level XML changed from 201311 to 201601.
If your application-level XML file(s) mention the googlesitemap module, please move it from GUI to GUIOptional.
    <Modules>
      <StandardModules>
        <GUIOptional>
          <Module name="googlesitemap" status="enabled-gui"/>
        </GUIOptional>
      </StandardModules>
    </Modules>
With v3.246 and v3.247, make one fix to whcfg_App.pas: line 2241 should read for idm := moduleEMail to moduleGoogleSiteMap do   This fix is included in v3.248.
Fix relevant to early shutdown v3.246
The TwhWebAction.Notification method has been improved to avoid access violations during shutdown when pWebApp is nil before all TwhWebAction components have been destroyed. Source: webLink.pas
For example, if during project startup with TtpProject, the custom logic decided there was a fatal error and startup should not continue, in the past, an access violation could occur.
TwhRequest: 0 verbs v3.247
Cleanup: the 9 verbs that had been present/unusable on TwhRequest have been removed.
Comments stripped v3.247
Two types of comments are completey stripped from .whteko files before they are loaded into droplets etc.
  1. Lines starting with '// ' two slashes followed by space
  2. Anything contained in a WebHub comment (an HTML comment starting with triple-dash)
(1) eliminates a parsing problem as well as a false-positive report in the syntax check report. (2) represents a change only to the syntax check report.
TPack Panel Detach v3.247
A new global boolean named TPackAllowDetach in unit utPanFrm controls whether the Detach feature is active or blocked. The detach feature causes tabbed-in panels to be able to float out as separate windows when a certain area of the toolbar containing them is clicked.
By default, the feature works the same as it has since 1995 which is that Detach is active. To block it, set TPackAllowDetach := False; // uses utPanFrm
Prologue Type: Javascript v3.248
PrologueTypeFromString implements proJS for JavaScript from a WebHub page.
Speed: Avoid Disk I/O for ReadOnly Session v3.248
Only take action in these functions if not a ReadOnly session: SaveToDisk, SavePlaceHolder, LoadFromDisk, TouchSession, SaveToFile.
Source: webVars.pas
Http Status Line v3.248
Custom calls to WebHubHttpPrologue now correctly use the status description rather than the status reason when making the status line in the HTTP prologue.
Source: webPrologue.pas; this change can be patched into earlier versions.
SendAuthRequest discontinued v3.248
Support for Response.SendAuthRequest has been discontinued. Modern web applications use login forms and session data, or access control provided by the operating system.
Prologue separated from Response File v3.248
For any custom WebHub applications or components that had been writing to Response.Stream.Text and included an http prologue followed by a double sLineBreak, a different technique is required now.
Write the prologue to this file: pWebApp.Response.PrologueFilespec.
Include the two trailing line breaks in that file.
Do NOT start the prologue with HTTP/1.1. Do not include a status line. Start with Content-Length and include the Content-Type.
Save the progloue file in UTF-8 without a BOM.
Example source: wdbChart.pas and webPict.pas
Please use v3.249+
TwhStream discontinued v3.248
Source for this old class, TwhStream, was refactored for v3.248 and left as a comment in the webPict.pas unit.
Blank SessionFirstIP ignored for WebRobots and ReadOnly Sessionsv3.249
Ordinarily, when pages execute, a blank SessionFirstIP value causes SessionReject. This is no longer done for WebRobot and ReadOnly sessions.
HTTP Status other than 200 v3.249
There was a problem in v3.248 if a custom WebHub app tried to use a status code other than 200. Fixed in v3.249.
SendCustomError v3.249
The use-case for this feature is simulating error situations, in particular, the extreme case of system overload which causes the WebHub isapi runner to send status 500.13.
There is a new method, Response.SendCustomError, with which you can trigger the use of the ISAPI function for sending a custom error. There are no http headers or content involved. You can specify the status text (e.g. 'WHBusy'), the major status code (e.g. 500) and the substatus code (e.g. 13).
No page content is relevant so if the Delphi code calls this method, the page execution will stop.
For anyone writing error handling using JQuery, note that jqXHR.Status gives the number (e.g. 500), and jqXHR.StatusText gives the text (e.g. 'WHBusy'). The substatus code is, by default IIS configuration, only visible on localhost, not over the WAN.
The substatus code will appear in IIS logs, but, the main status code will be transformed to '200' even if you specify 500.
SimulateAppNotRunning etc. v3.249
All the Simulate... methods on pWebApp.Response now close the output document as soon as the simulated error message has been sent.
These Simulate... methods now include the X-Status-Reason header with the situation abbreviation such as AppNotRunning.
Response.HTTPStatusReason property removed v3.249
The HTTPStatusReason property on the TwhResponse component has been removed.
(top)

The Hub

Smaller RAM footprint: hub.exe v3.241
Compared to wh v3.238..v3.240, the Hub will take less memory when it runs.
This Hub v3.241 is only compatible with runners and custom WebHub apps built with the same version. Please do not mix versions.
Command Line Client: whadmin.exe v3.241
WebHubAdmin (with GUI) has been transformed to whadmin.exe 64-bit command line client. For usage details, use --help, i.e. whadmin.exe --help.
This obviates the need WebHubAdmin plus two other utilities, ShutdownWHApps and WHCoverMgmt. Here is the syntax that handles the features of those two utilities:
whadmin app instances stop all
whadmin app instances stop --appid=adv
whadmin app instances set-count --appid=adv --count=3|min|max

whadmin app cover --appid=adv --minutes=3 "--reason=full database backup"
whadmin app cover all         --minutes=5 "--reason=full database backup"
whadmin app uncover --appid=adv
whadmin app uncover all
To view license details:
whadmin config license view
To add or change license details:
whadmin config license add-metadata --licensee=__ --serialno=__
To control The Hub service:
whadmin hub start
whadmin hub stop
whadmin hub restart
To see which processes have connected to The Hub:
whadmin report connected 
All parameters are case sensitive.
No longer shipping: ShutdownWHApps and WHCoverMgmt. While these utilities continue to work with v3.241, it is recommended that you change your server scripts to use the new whadmin.exe utility.
whadmin.exe v3.243
Re whadmin.exe app instances set-count --appid=__ --count=__, when this relates to a service for which more than 1 instance can run, whadmin will fill in "gaps". For example, say you start 3 instances and then stop instance #2. If you then ask whadmin to set the count to 3, it will start service instance #2 so that the total comes back to 3.
Code signed: SHA256 v3.248
Binaries shipped with v3.248 are code signed with a newly issued SHA256 certificate.
(top)

WebHub Runners

Logging v3.240
The ISAPI runner can log warnings, errors and exceptions if CodeSite Dispatcher is started before the IIS worker process. For best results, install CSDispatcher as a service with automatic start.
To enable logging within a particular runner, set the LoggingLevel for the relevant RunnerID using ZMAdmin. By default, the logging level is 'none'. See hints in ZMAdmin for details.
The xsd date for WHNetworkInfo.xml is 201512.
First 512 bytes v3.244
The runner sends the first 512 bytes then the balance in 16kb blocks.
HSE_IO_SYNC v3.246
Internally, when calling the ISAPI WriteClient function, the runner explicitly sets the dwSync to HSE_IO_SYNC. This is supported by IIS 6 and higher.
ISAPI callback change v3.247
For performance reasons, the isapi runner now uses a different callback function when sending back a response calculated by a custom WebHub application.
The larger the page size, the faster this will be compared to v3.246 and earlier versions.
Remember to use the same version of WebHub Components for your custom EXEs as Runtime, i.e. v3.247.
HEAD response v3.247
The verb "HEAD" is now fully supported by the runner.
A Content-Length header is NOT included because the custom application may decide not to bother calculating a real response for a HEAD request.
Note that webpagetest.org always issues a HEAD request prior to doing its GET test of your page (as reviewed in February 2016).
Upgrading to v3.247 is recommended for anyone attempting to measure their TTFB speed using webpagetest.org.
r:echo etc v3.248
The r: and h: command pages including r:echo will only give a '-' response unless you test on localhost or on the authority defined for testing of your runner.
Speed v3.248
Runner uses a more efficient technique to find out how the Hub scheduled the page request with the App. The result is that parallel client requests can be processed much faster and more reliably.
Major portions of the ISAPI extension were rewritten and optimized. Consider carefully testing any of the following and report any issues to techsupport (at href dot com).
  1. Hub not running; hub stop and start between tests while keeping apps running
  2. IISRESET then first request versus 2nd+ requests
  3. Requests from parallel clients, either through an IFRAME or apache benchmark or powershell or other testing tools. An IFRAME testing example is in webhubdemos\Live\WebHub\WHTML\Shared WHTML\sharepgs.whteko on PageID pgstressteenypages.
  4. Requests directly to the runner (r:echo, r:vers, r:version, r:pcv, r:ipc) versus directly to the hub (h:vers, h:ipc, h:nct) versus to WebHub applications.
  5. Requests to pages whose size is less than 512 bytes, or more than 16kbytes, or more than 150kbytes.
  6. Requests to extremely fast versus extremely slow pages.
  7. Any pages with custom content types, whether that is set in WHTEKO or Delphi.
  8. In IIS Manager, AppPool identity as LocalSystem or something else. (We recommend using LocalSystem.)
  9. In IIS Manager, AppPool queue length of 500, 1000 or other.
  10. In IIS Manager, AppPool having 1 or more AppIDs; and whether there is sharing of 1 or 2+ runner files within the AppPool.
  11. The logging level for the runner and hub. We recommend "warning,error,exception" or if you want to troubleshoot in depth, use "all" or just add "infotype" and/or "note" depending on how much detail you wish to see.
  12. All binaries should have digital signature details from HREF Tools Corp., including the Setup.exe, hub.exe, runisa.dll and whadmin.exe.
  13. File upload including uploading files larger than the limit.
  14. SendFileIIS
  15. Bounces especially when combined with session deletion.
If you wish to report a problem, please try to include data about test results with an earlier version of WebHub and specify all platform details including IIS version and WebHub version.
Reliability v3.248
If you have been seeing wp.exe crashes in the Windows event log, make a separate IIS AppPool for each AppID that is active on your server.
Runner writes to the Windows event log if it does not have sufficient resources to parse the request and perform minimal initial processing. The return response will be status 503 with a Content-Length of 0 bytes.
Direct ISAPI bounces v3.248
Optional: in the runner flags, you can add hseurl and that will cause runisa.dll to avoid the HSE_REQ_SEND_URL_REDIRECT_RESP function within the worker process when BOUNCEs are processed.
Only add this flag if you have trouble with status 302 bounces.
To add the flag, use ZMAdmin and go to WebHub Configuration > Connectivity Layer > Runners > your runner > Advanced flags.
The use of HSE_REQ_SEND_URL_REDIRECT_RESP is active by default, because that is the quickest way to have IIS process the bounce.
Long query strings v3.248
Query strings longer than 30 characters are now passed through the request input file, without the use of a separate .qs file.
cgi-bin v3.248
The cgi-bin runner is not supported at this time. Use the isapi runner.
ISAPI runner v3.249
In case of overload, this version sends status 500.13 (not 503 as v3.248 did).
This version does not report itself unhealthy (as v3.248 did, which led to an immediate recycle of the AppPool, which requires even more resources).
This version terminates using a different/better/faster technique.
 
 
(top)