WebHub Object Pascal Components
- pWebApp.ExportPages: new method to export all pages v2.130
- This is equivalent to the verb: WebHubApp > Export Pages. It exports static HTML files for
each page that has an exportfilename defined (in the whpage tag).
- TNativeXml source v2.130
- Sim Design has made TNativeXml open-source and released version 3.10.
- WebHub had been using a somewhat different version of the code (based on our own modifications).
It will take some time to resolve all differences; for now we are releasing a version that includes the
features in 3.10 while keeping the string processing as before.
- The file NativeXml300.pas contains the PRIOR version of NativeXml that we had been shipping. The file
NativeXml.pas contains the latest, merged code.
- Fixed memory leak on refresh v2.130
- New event: OnHeader for Scan component
- This event lets you send your table header row easily. Previous demos used the OnInit event but
that is not perfectly compatible with having Buttons above; using OnHeader works much better.
- Started separation of App Output panel into gui/non-gui v2.130
- New unit: whdm_AppOut.pas
- This unit is automatically created if you enabled the AppOut panel.
- When running as a service, the non-gui portion will be created (including the w3validation feature), but
not the output panel, unless you put
/debug on your command line to specifically request the gui.
- Allow blank value for ExportURLPrefix v2.130
- Previously the default had been '/' so one had to use './' if no prefix was needed.
- Remove splash screen after TwhBasicApp.RefreshFile v2.130
- Save speedbutton (in HTML editor) had been leaving splash screen visible.
- For Delphi XE with Update 1 v2.132
- Embarcadero has shipped Update 1 for Delphi XE (Code Central)
and there has been an interface change which impacts on WebHub. So, please install the update and then use
WebHub v2.132+. If you have not installed the Delphi XE update, use WebHub v2.131.
- Recommend against setting pConnection.Active to False v2.132
- Known issue: suspending the WebHub Application instance by setting Active to False does NOT work (and
has not worked for a long time). As an alternative, call
FreeAndNil(pConnection) to take the application
temporarily offline (off the Hub), and call
pWebApp.Refresh to reconnect.
- SET command with strict syntax v2.133
- Example: SET|Session['x']='hello, world'
- This was NOT working in some WebHub apps - randomly - depending on what was on the stack. Fixed to work
in all cases. The unit fixed is htWebApp.pas.
- Fixed serious error, as-service, with whsample_DWSecurity.pas v2.133
- Code in whsample_DWSecurity.pas that succeeded when the EXE ran as-an-application had been failing as-a-service.
This led to the service dropping off the Connected panel, even though it was still running.
- This has been fixed.
- Tray icon for whMain.pas corrected in FormCreate v2.134
- If your app was showing the wrong tray icon upon first startup, and corrected itself after subsequent requests or manual restore/minimize steps,
then the small fix just added in whMain.pas will solve the problem for you.
- CoverApp, UncoverApp routines moved to htWebApp.pas v2.135
- These routines have been moved out of whsample_EvtHandlers and into htWebApp.
- Google Sitemap sample respects Server Profile v2.135
- Previously, the google sitemap feature assumed that you were using StreamCatcher with short URLs.
Now all settings of the current Server Profile are taken into consideration.
- If you are making a sitemap for an exported WebHub site, then the sitemap will contain
export filenames, exactly the same as before.
- Source for command-line utility to cover and uncover apps v2.135
- There is a new unit shipping, with source, whsample_CoverMgmt.pas and it is compatible with Delphi 7 through Delphi XE.
- The idea is that you can make a console application and just call the single procedure in the PAS file, and the resulting
EXE will let you cover and uncover applications from the command prompt, e.g.
WHCoverMgmt.exe /cover /appid=abc /minutes=3 "/reason=database backup"
- If you have monitoring systems in place and you do NOT want them to trigger during planned maintenance, covering your app is the solution.
- See also:
webhub\bin\ShutdownWHApps.exe which tells all connected WebHub apps to exit immediately.
- INCLUDE defaults to loading files relative to application-level XML file v2.135
- Previously, if no path were specified, the INCLUDE command loaded the file relative to the location
of the running EXE. Now it works relative to the application-level configuration (XML) file.
- New web action component: TwhCaptcha v2.136
- See new unit: webCaptcha.pas
- Complete documentation! How To Captcha with WebHub.
- TwhCaptcha in standard whMail.pas unitv2.139
- If your projects uses the standard email module (whMail.pas), then
you can refer to a component named
webmailCaptcha in your WHTEKO files.
- Reminder for Delphi 7 users: isDelphi7UTF8 flag
- This is how the Demos are set:
whConst.isDelphi7UTF8 := True; // all demos assume UTF-8 encoding
- If you are definitely NOT using UTF8 and want to stick with Ansi, use the default value of the flag which is False.
- How to Trace component, macro and tekero calls v2.137
- If you compile with directive "CodeSite" (and without WebHub packages)
then the whAppOut.pas file will have a new variation on an old feature: tracing.
Instead of putting the trace information into a memo or into the HTML as comments, it will put it into the CodeSite log.
- CodeSite is a separate product, for sale by Raize Software in USA.
- To use the feature, first enable the Output panel using ZMAdmin. When your WebHub app is running, go to the output panel
and click the [Trace On] button which has an icon of three footsteps walking along a lonely beach (some imagination required). You can
then checkmark the items that you wish to trace.
- For best results, run the CodeSite Dispatcher before you start your WebHub application.
- See ucCodeSiteLogging.pas for the setup of the logging; you only need to change that code if you prefer something other than "Live" logging.
- To learn about CodeSite, see this FREE video from Code Rage 5
or Dr. Bob Tutorial on CodeSite Express.
- ASync code tested and improved v2.137
- The async code (whAsync.pas) is now in production on www.codenewsfast.com
- For developers with Raize CodeSite plus a WebHub Useful Source license, you can compile your app with -DCodeSite in order to
easily generate a friendly trace of the async calls.
- The code which had been simply assigning integers and LongBool values now uses InterlockedExchange.
- Special pass granted to Mediapartners-Google for AdSense v2.137
- This applies if you are using Google Adsense on your web site AND using whsample_EvtHandlers.pas AND checking for "Bad" (changed) user agents.
- The sample OnBadBrowser event handler now allows interruptions from Google Media Partners, without bouncing them or the human
who triggered the advertisement.
- Recommendation: do NOT keep Mediapartners-Google in your StreamCatcher webrobotlist.txt file.
- Logging of rejected sessions v2.138
- The flag that decided whether this information would be logged did not respect context in the application-level XML file.
Now it does. Fixed whcfg_App.pas.
- Load UTF16 .log files in D07 v2.138
- These two functions can be used with D07 to load UTF16 .log files
into memory: AnsiStringLoadFromUTF16File and/or UTF16StringLoadFromUTF16File
- Special handling possible for Google MediaPartners v2.138
- See new event handler in whsample_EvtHandlers.pas: OnSetUserAgentID
- There may be uses for this beyond the example given. The sample enables Google Media Partners (i.e. the user agent that
comes in after a surfer requests a page that runs Google Adsense) to re-request that page without triggering OnBadBrowser (as previously
was the problem).
- The feature is active ONLY when you make a page setting to confirm that you want it, i.e. on public web pages where you are
running AdSense. You should never allow it on members-only pages.
- UTF8 fix in TNativeXml v2.137, v2.138
- Fixed an issue which had caused trouble with Chinese and other non-Latin symbols in XML files.
- New TPack unit: ucRegNow.pas v2.138
- This unit contains the code that one requires in order to get a product certified at www.regnow.com.
- This code is similar to the Delphi example provided by RegNow. It has been slightly restructured such that you can more easily use it from
one or more products.
- Includes source. No DFM file required.
- Improved TtpProject v2.138
- Symptom: setting Continue to False during
OnDataModulesInit failed to stop the application from running.
- Now the application will run the OnStartupError event and then exits.
- Access violation from Restorer during application exit: fixed v2.139
- The problem seems to have been the call to cx.NilIfSet, from the Restorer component, regarding the ZaphodsMap component.
This problem showed up during DUnit testing on a multi-cpu machine. The same tests now pass in D07 and D15.
- Dozens of small fixes such that (almost) all TPack DUnit tests pass in D07 and D15 v2.139
- Most fixes were in ucLogFil.pas and impacted file i/o in general. We now support Ansi, UTF8 and UTF16 file formats.
- The ucPipe.pas unit was also significantly upgraded. For old Delphi, you can call GetDosOutputA with one added parameters
ErrorCode: Integer. For Unicode Delphi, call GetDosOutput with new parameters
(more features, UnicodeString support). Source for the ucPipe.pas unit is included with WebHub.
- If you use Unicode Delphi and call StringWriteToFile, check and make sure that you want the output to be in UTF16 format.
If you do not want that, (a) cast the file-contents to AnsiString and it will be written as such, or (b) call UTF8StringWriteToFile for UTF8 encoding.
- whAsync.pas v2.139
- One small but very significant change, in procedure TwhAsyncObject.SetDone, changed the line that sets FFinished to
- new unit: ucURLEncode.pas v2.139
- This unit contains functions for encoding and decoding www form data that has been posted in UTF8 format
and has been url encoded. This is used internally by the runners.
- webVars.pas has streaming class available for customization v2.139
- Some code that had been off by default (via IFDEF) is now on. This lets you hook up a compression algorithm for streaming
the session VAR files (optionally), if you have the TCompress component from www.webcentre.co.nz or equivalent.
The Hub, WebHubAdmin, ZMAdmin
- On Windows 7, WebHubAdmin Connected panel hears news from The Hub. v2.131
- Fixed tpShareB.pas such that WebHubAdmin can display status information provided from the Hub,
on its Connected Panel.
- ZMAdmin configuration improved v2.131
- CookieSessionName can be entered for each AppID, after ShareByFile. The setting is saved to the WHCentralInfo.xml file.
- Hints are included for all settings for the WebMailForm component.
- Hub.exe with HubApp improved v2.133
- Going back to at least v2.126, if you made a request to the Hub's application (e.g. hubvers), you could not stop
the service without using end-task. This has been fixed.
- D07/D15 Release/Debug Extra Variations Shipping v2.139
- On FTP, customers will find a 7Z archive file containing EXTRA binaries for the Hub, WebHubAdmin, and at least the isapi runner.
There is a readme file in the archive explaining how to make sure of them. They are being provided while we transition from
non-Unicode-D07 versions of WebHub Runtime executables to yes-Unicode-D15 versions -- just in case. So for example,
the default version of WebHubAdmin is now compiled with D15. If for some reason you want to use the D07 version, look for it
in the EXTRA archive. (as of 11-Jun-2011 07:40 gmt)
- Installer supports Latin-1 paths v2.139
- There has been a change to the installer. It is now explicitly using Ansi code page 1252 when considering data that is loaded from
configuration files, e.g. the path where you install your Hub. Previously it was using whatever Ansi code page happened to be the default
on your machine.
- Support for BOUNCE generated by apps compiled with v2.012 v2.130
- Version feature reports some ZaphodsMap config data v2.134
- To assist in troubleshooting, especially in IIS7, the
?version response now includes extra data
when requested on localhost, example
/scripts/runisa64.dll?version. It reports the default AppID, the ZaphodsMap root, the filespec for the WebHub
Central Information file, and the runner's temporary folder.
- This is what a response should look like, from ?version:
Runner ID: isapi64
WebHub Runner ISAPI 64-bit v18.104.22.168 on Microsoft-IIS/7.5 as at 08-Jan-2011 03:59:24.
Default AppID: appvers; ZaphodsMap root: D:\AppsData\ZaphodsMap\; WHCentralInfo.xml: d:\AppsData\WebHub\WHCentralInfo.xml; WHTemp: c:\temp\webhub\
- Latin-1 charset support v2.130
- On Win2012 server, if you want to specify a charset other than utf-8 and have it work in Internet Explorer v11 (IE11), use
the following syntax which was confirmed working 5.Mar.2015 in spite of the obvious syntax errors.
// NB: set HTTP header values after flushing the output document.
// NB! for runner v2.130, just send the additional charset
// this leads to "text/html,; text/html; charset=iso-8859-1" when used on Win2012 and IE11 supports that. Firefox and Chrome are fine with many variations including correct syntax.
%=HEADER|Content-Type: ; text/html; charset=iso-8859-1=%