WebHub Object Pascal Components

New routine: TrimWhitespace v3.210
Trims all whitespace characters from beginning and end of string.
Source: ucString
New routine: DblQuotedStr v3.210
Surrounds string with double-quote symbol, as required by JSON.
Contributed by Ronan van Riet.
Source: ucString
Logging for nil webaction v3.210
If, during page generation, a call is made to a webaction which cannot be found by name, the CodeSite log will contain extra detail. Look for phrase 'webaction nil' in the log.
Troubleshooting "Access is Denied" on App Refresh v3.210
The uAutoDataModules.pas unit now reports more possible problems when the app fails to refresh.
When the underlying exception is EOSError code 5, Access is Denied, the problem is that the app cannot communicate with the Hub. One solution is to run the application outside Delphi. If you want to work within the Delphi IDE so that you can use the debugger, start the Delphi IDE itself with Run As Administrator.
For other problems such as missing AppID definition, you should get a detailed error message to that effect.
TwhPGP component retired v3.210
The link to Pretty Good Privacy, TwhPGP, in webpgp.pas, has been removed from webmail. It had only worked if you had the command-line PGP tools available.
The webPGP.pas unit is no longer shipping as of v3.212.
EncryptOutgoing property on mail component v3.211
If you use email and compile with v3.210 specifically, you will get a runtime exception about a missing property. To resolve this, edit the whMail.dfm file to remove the reference, or please compile with v3.211.
If you have custom datamodules with TwhMail from an older version, erase the reference to EncryptOutgoing from your DFM file.
WebHub mail module uses Indy TidSMTP for StartTLS support v3.212
This note applies to Delphi XE3 and later.
The TwhMailForm component used by the standard WebHub mail module has two new properties, IndySMTP and IndyMessage. These are used when sending email messages. Now you can use SMTP servers such as Google Mail and Amazon SES which require StartTLS (security) for email transmission. You can still also use intranet SMTP servers which allow plain-text connections.
If you are using TwhMailForm through settings in the application-level configuration file, then you do not need to change anything in WHTEKO nor PAS files. If you have written your own code for sending messages with TwhMail or TwhMailForm, and you have Delphi XE4 or later, see the whSendMail demo project for syntax.
See also: Test_Indy_Smtp demo project, a standalone email example
To test backwards compatibility: whSendMail demo using plain text smtp
To test StartTLS security: whFeedback demo, 2. Feedback Message using your own gmail account details such as smtp.gmail.com and your email address and password.
For more information about installing Indy 10, see indyproject.org VCL sockets.
WebHub Wizard: Project > Edit App Config File v3.212
Fixed so that XML file is opened in Notepad.
WebHub Email with Indy: small changes v3.213
The TwhMailForm component uses the TidMessage.CCList to send carbon copies ("CC"), and the BCCList to send blind carbon copies ("BCC").
The TwhMailForm component defaults to charset utf-8.
The TidMessage component is cleared prior to re-use in case a message had been previously sent with an attachment and the current message has no attachment, because that condition led to exception "Missing start boundary". The call to TIdMessage.Clear avoids this problem.
WebHub Email with Indy: small changes v3.214
The CCList and BCCList are cleared before a new message is sent. This was not the case in v3.213.
Delphi XE6 VCL Support v3.213
WebHub v3.213 supports Delphi XE6 as of 26-Apr-2014.
Customers with any active WebHub Components subscription may download files for XE6 at no additional charge.
Minor changes to JSON syntax for XE6 v3.214
Unit ucJSONWrapper modified so it does not use any deprecated syntax in XE6. No changes for older Delphi.
Base64 encoding, 64-bit v3.214
Significant correction to base64 encode and decode feature, for win64 only.
Google Sitemap XML v3.214
For static exported sites using lingvo, the google sitemap URLs will include the domain name and /lingvo/ URL prefix such as /en/ for english.
Exporting to Static Pages v3.214
Static content is exported properly even if (a) no dynamic page requests have gone through the EXE since it started and even if (b) any of the Init or WebAppExecute methods on datamodules happened to call pWebApp.Expand.
WebHub Wizard v3.214
Slight improvements to the PAS code provided when you add a WebHub datamodule to an existing project.
DYNJUMP v3.215
Links to remote server profiles always include AppID, even for short urls.
Google Sitemap v3.215
If your project has more than one lingvo, the googlesitemap will include references for all variations of the URLs, whether dynamic or exported.
Within the ExportURLPrefix, /en/ is automatically changed to the lingvo as the files are processed, where /en/ is your ProjectLingvo, lowercase.
Source: whsample_GoogleSitemap.pas
ExportLingvo v3.215
New property on TwhApplication: ExportLingvo string.
This is relevant when exporting files to static HTML, when the project has more than one lingvo.
LingvoCodeList v3.215
New properties on TwhApplication: LingvoCodeList and LingvoCodeListCS. // uses webBase
The first one gives you an array of strings where each string is a lingvo code such as 'en' or 'es'. The second one gives you a comma-separated list of the same data. In both cases, the data comes from the StreamCatcher configuration file.
See whsample_GoogleSitemap.pas for usage.
Exporting v3.215
The export feature now exports separate copies for every lingvo known to StreamCatcher.
Within the Static.ExportFolder, \en\ is automatically changed to the lingvo as pages are processed, where \en\ is your ProjectLingvo, lowercase.
To facilitate exporting translated content, TwhSession.SessionLingvo respects ExportLingvo during exporting.
Persistent Cookies v3.215
The COOKIE command respects an expiration value of In10Years for use when you need a cookie to last well into the future.
GetFileLink is obsolete v3.215
The property FileLink on the application object has been erased.
Session.ImageMaps is obsolete v3.215
The property ImageMaps on the TwhSession object has been erased.
-target syntax in JUMP is obsolete v3.215
The - separator within a PageID had, for many years, been allowed as a shortcut for generating a target in a JUMP, JUMPR, GO, GOR, HIDE, HIDER, ACTION, ACTIONR, HREF.
The W3 consortion has been trying to discourage the use of target="" within links, especially in HTML5. w3schools.com reference
To find such target links in your own whteko files, search for regular expression
(jumpr?|actionr?|gor?|hider?|href)\|[^-, "'|]*- with FuzRegex, EditPad, Grep or any other tool supporting regular expressions while searching.
Example old and new expressions
  • old: (~jump|UPScom-upswindow|class="moveright"|View status of all 10 shipments at UPS.com~)
  • new: (~jump|UPScom| class="moveright"|View status of all 10 shipments at UPS.com~)
  • new: (~jump|UPScom| target="UPScom" class="moveright"|View status of all 10 shipments at UPS.com~)
Please remove -target syntax from JUMPs, or move it to an override attribute as shown in the 'new' examples above.
Session.MacroCost is obsolete v3.215
The property MacroCost on the TwhSession object has been erased.
Session.PageCost is obsolete v3.215
The property PageCost on the TwhSession object has been erased.
Session.SessionCost is obsolete v3.215
The property SessionCost on the TwhSession object has been erased.
WebMail v3.216
Reminder: two openssl library files are required with the webmail component, libeay32.dll and ssleay32. These are available for Windows thanks to contributors.
As of v3.216, if you do not have those library files available to your custom WebHub EXE, either in the same folder as the EXE or on the PATH, then a PageError will be logged. EMails are not sent when the library files are missing.
SilentExecution Boolean for WebActions v3.217
The new SilentExecution Boolean property will prevent a CodeSite Note from appearing in the CodeSite log when the webaction executes. This can be helpful when using a webaction for logging purposes, or for toggling small values, where you do not need WebHub core to tell you the execution sequence.
ucFile, ucLogFil unit cleanup v3.217
Removed the GetSystemConfigPath and GetHomePath functions. These were unused in WebHub.
Removed the tpLogMessage function. Use the HREFTestLog, AppendToLog, CSSend or LogSendInfo functions.
Support for GUI access from whteko is obsolete v3.217
The .click suffix in WHTEKO no longer reaches the Click method for a TControl.
The Caption property of TLabel components is no longer available in core WebHub.
The Text property of TEdit components is no longer available in core WebHub.
If you want to rely on GUI controls, please use a custom webaction component with your own syntax.
Traduko method falls back to ProjectLingvo v3.217
The pWebApp.Traduko method now looks for translations based on the DesignLingvo, the surfer lingvo and the ProjectLingvo. Previously, for a non-blank surfer lingvo, the ProjectLingvo was ignored.
Shared objects: CreateNamed v3.217
The syntax for the CreateNamed method has changed slightly. For simple types such as integer and boolean, it is no longer necessary to specify the data size. For variable length types, the length is required.
A new optional parameter lets you indicate when an instance of a shared object is Readonly. This can and should be passed in using CreateNamed.
Shared objects: CreateNamed v3.218
The default behavior remains global shared objects. However, for sharing memory between end-user processes on Windows Vista+ with User Access Control ("UAC"), you can now request that "local" shared memory be used. This is a matter of a Boolean toggle when initially creating the object with the CreateNamed method.
There are new constants that you can use to keep your code readable regarding the new flags passed to CreateNamed:
  • cReadonlySharedMem : True - readonly // uses tpShareB
  • cReadWriteSharedMem : False - not readonly - default
  • cGlobalSharedMem : True - for global shared memory, suitable for use in Services and by Administrators
  • cLocalSharedMem : False - for so-called local shared memory, suitable for use by any type of user on Windows Vista+ with UAC
Shared objects: IgnoreOwnChanges False v3.218
A False setting for IgnoreOwnChanges had not be working prior to v3.218 for TSharedBuf, TSharedInt, etc. It had been working only for TtpSharedInt32. Now it works for all classes.
TtpSleeperThread: A/Vs and/or hang during Destroy v3.218
A long-standing intermittent problem with destroying TtpSleeperThread objects has been tracked down and fixed.
This problem was not terribly obvious and was definitely intermittent. It was responsible for slow IISRESET and net stop w3svc when the WebHub runisa.dll would not leave memory quickly and gracefully.
Delphi XE7 support v3.219
WebHub VCL source has been updated to support Delphi XE7.
ReadOnly Session v3.218
Previously the OnBadBrowser event was called when page requests came through on the readonly session using a different user agent compared to the prior request. This has stopped. Because the readonly session is designed to be public and shared, it is unfair to raise an alert when the user agent changes.
Previously the OnBadIP event was called when page requests came through on the readonly session with a different ip number. This has also stopped as of v3.218. Changed unit: webSend.pas.
These fixes were signficant for the pgStressTeenyPages test which is presents in the WebHub demos.
Traduko v3.218
The TwhRespondingApp.Traduko method now takes a boolean flag which enables you to receive the expanded version of the translated content.
tpLogMessage is obsolete v3.218
Replace calls to tpLogMessage with any of the alternative logging calls such as CSSend, LogSendInfo or HREFTestLog. Source for logging functions are in the ucLogFil and ucCodeSiteInterface units. The LogSend* functions will direct output to either CodeSite or a plain-text LOG file depending on whether you compile with -DCodeSite.

The Hub, WebHubAdmin, ZMAdmin

Shutdown and Cover Page utilities v3.217
Two utilities must match the WebHub Runtime version exactly when changing to v3.217: ShutdownWHApps.exe and WHCoverMgmt.exe.
Reliability v3.218
There have been a significant change to the IPC algorithm as of v3.218. It will take several weeks to determine how well this resolves certain intermittent problems.
v3.218 as of 2014-08-22 03:47gmt has been loaded on HREF-managed servers.
UTF8UpperAZ v3.218
UTF8UpperAZ is obsolete. Use UTF8UpperCase because it will correctly capitalize, for example, c circumflex for French.
Compiled with XE7 v3.219

WebHub Runners

URL sanitized v3.210
The ISAPI and cgi-bin runners change left- and right-angle brackets into sanitized equivalents, to minimize the impact of script injection within the URL.
Multiple changes to internal IPC logic v3.218
Units: tpShareB, whRunner, isapiIntf.
Rapid initial requests v3.218
The ISAPI runner has been improved to handle the response to a rapid stream of requests when the runner is trying to make establish its connection point with the Hub. This typically happens just after IISRESET or server reboot on high-traffic servers.
Compiled with XE7 v3.219