[twsocket] ICS Wiki : author wanted

2009-06-24 Thread Francois PIETTE

Hi !

As you probably know, we have a Wiki for ICS documentation: 
http://wiki.overbyte.be
A wiki is a collaborative tool. We already have a few authors writing 
articles.

Actually not that much !

If you have some spare time, please use it to write some article in the 
wiki. If each ICS user write only a single page, we will have tens of 
thousands pages ! No need to know everything. It is enough if you know 
ONE thing. Just write a page and you'll enter the hall of fames :-)


To collaborate, just login onto the wiki and email me the usercode you 
selected. I will give you write permission.


Thanks a lot.

--
francois.pie...@overbyte.be
The author of the freeware multi-tier middleware MidWare
The author of the freeware Internet Component Suite (ICS)
http://www.overbyte.be

--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


[twsocket] Primary DNS suffix

2009-06-24 Thread Paul

Is it possible to get this using ICS ?

thanks,

Paul
--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] Primary DNS suffix

2009-06-24 Thread Francois Piette
 Is it possible to get this using ICS ?

Probably not.

--
francois.pie...@overbyte.be
Author of ICS (Internet Component Suite, freeware)
Author of MidWare (Multi-tier framework, freeware)
http://www.overbyte.be
--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] FileMD5 : Different Hash Result - same File ondifferent workstation

2009-06-24 Thread ineic...@triple-m.ch
Phhh..

I just got back.
Face this: On this client some files (not all!) had a different md5 hash.
But this everytime with all tools!
After a while i did a reboot - and guess: everything was as expected.
Maybe Piotr was right with some harware issue. Very very strange!

Whatever. 
I wrote this tool to check FileMD5 with ICS_V6, ICS_V7 and INDY_10.
It display's the result in a memo with time measurement.
E.g. a 44MB Mpeg File displays:

Host: [WSBIERI] File: [D:\_BuProcVideoData\19052008noch eine
aufzeichung395876456777894.mpg]
MD5 ICS_V6 :[E48FFC453C495B2F2EA2F33ACBC5586B] in [696] msec
MD5 ICS_V7 :[E48FFC453C495B2F2EA2F33ACBC5586B] in [680] msec
MD5 Indy_10:[E48FFC453C495B2F2EA2F33ACBC5586B] in [1488] msec

Feel free to download and use it:
www.triple-m.ch/md5.zip
(Windows Executable)

Thanks 
Peter




Piotr Dałek enigmati...@interia.pl hat am 23. Juni 2009 um 21:31
geschrieben:

 Hello!
 
  Thank you all,
 
  I tried it with v6 and after that with v5 (using Delphi 2007).
  Unfortunately i do not have remote access to this client.
  Tomorrow i i'll go there and try with:
  - ICS v7
  - The suggested tool
  - using a test app with indy (i'll do it this night)
 
  i'll come back to you
 
 This *might* be also a sign of corrupted RAM or failing motherboard,
 especially if you get different hashes every time.                  
 
 -- 
 Piotr Dałek
 enigmati...@interia.pl
 
 --
 Przekaz dalej wiadomosc: Zawsze warto oszczedzac. Teraz 5,5%!
 Sprawdz  http://link.interia.pl/f21b1
 
 --
 To unsubscribe or change your settings for TWSocket mailing list
 please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
 Visit our website at http://www.overbyte.be
--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be

Re: [twsocket] FileMD5 : Different Hash Result - same File ondifferent workstation

2009-06-24 Thread Tobias Rapp
ineic...@triple-m.ch wrote:
 I wrote this tool to check FileMD5 with ICS_V6, ICS_V7 and INDY_10.
 It display's the result in a memo with time measurement.
 E.g. a 44MB Mpeg File displays:
 
 Host: [WSBIERI] File: [D:\_BuProcVideoData\19052008noch eine
 aufzeichung395876456777894.mpg]
 MD5 ICS_V6 :[E48FFC453C495B2F2EA2F33ACBC5586B] in [696] msec
 MD5 ICS_V7 :[E48FFC453C495B2F2EA2F33ACBC5586B] in [680] msec
 MD5 Indy_10:[E48FFC453C495B2F2EA2F33ACBC5586B] in [1488] msec

If your intent is to benchmark the speed of different MD5 implementations I
suggest that you add MD5 routines from the DcpCrypt package [1] into your
comparison list. When I compared it to ICS v5 on my machine some time ago it
was faster than ICS.

Also it would be great if your tool would output both processing time (wall
clock time) and used CPU time (kernel + user time, see [2]).

Just my personal suggestions.

Tobias


[1] http://www.cityinthesky.co.uk/cryptography.html
[2] http://msdn.microsoft.com/en-us/library/ms683223(VS.85).aspx
--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] FileMD5 : Different Hash Result - same File ondifferent workstat

2009-06-24 Thread Angus Robertson - Magenta Systems Ltd
 If your intent is to benchmark the speed of different MD5 
 implementations 

You also have to allow for file caching.  I added buffered file access to
the ICS v7 hashing units recently, and the difference between the first
and subsequent runs can be 50 times different, once the file is cached by
Windows. 

Angus
 


--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] FileMD5 : Different Hash Result - same File ondifferent workstation

2009-06-24 Thread Fastream Technologies
I think you should try our tool as well with ICSv6 as it also has file
buffering.

Regards,

SZ

On Wed, Jun 24, 2009 at 1:15 PM, Tobias Rapp t.r...@noa-audio.com wrote:

 ineic...@triple-m.ch wrote:
  I wrote this tool to check FileMD5 with ICS_V6, ICS_V7 and INDY_10.
  It display's the result in a memo with time measurement.
  E.g. a 44MB Mpeg File displays:
 
  Host: [WSBIERI] File: [D:\_BuProcVideoData\19052008noch eine
  aufzeichung395876456777894.mpg]
  MD5 ICS_V6 :[E48FFC453C495B2F2EA2F33ACBC5586B] in [696] msec
  MD5 ICS_V7 :[E48FFC453C495B2F2EA2F33ACBC5586B] in [680] msec
  MD5 Indy_10:[E48FFC453C495B2F2EA2F33ACBC5586B] in [1488] msec

 If your intent is to benchmark the speed of different MD5 implementations I
 suggest that you add MD5 routines from the DcpCrypt package [1] into your
 comparison list. When I compared it to ICS v5 on my machine some time ago
 it
 was faster than ICS.

 Also it would be great if your tool would output both processing time
 (wall
 clock time) and used CPU time (kernel + user time, see [2]).

 Just my personal suggestions.

 Tobias


 [1] http://www.cityinthesky.co.uk/cryptography.html
 [2] http://msdn.microsoft.com/en-us/library/ms683223(VS.85).aspx
  --

--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] FileMD5 : Different Hash Result - same File ondifferent workstation

2009-06-24 Thread ineic...@triple-m.ch
I'll have a look at your suggestions when i have the leisure to do it.

Thanks again.
Peter

Fastream Technologies ga...@fastream.com hat am 24. Juni 2009 um 13:02
geschrieben:

 I think you should try our tool as well with ICSv6 as it also has file
 buffering.
 
 Regards,
 
 SZ
 
 On Wed, Jun 24, 2009 at 1:15 PM, Tobias Rapp t.r...@noa-audio.com wrote:
 
  ineic...@triple-m.ch wrote:
   I wrote this tool to check FileMD5 with ICS_V6, ICS_V7 and INDY_10.
   It display's the result in a memo with time measurement.
   E.g. a 44MB Mpeg File displays:
  
   Host: [WSBIERI] File: [D:\_BuProcVideoData\19052008noch eine
   aufzeichung395876456777894.mpg]
   MD5 ICS_V6 :[E48FFC453C495B2F2EA2F33ACBC5586B] in [696] msec
   MD5 ICS_V7 :[E48FFC453C495B2F2EA2F33ACBC5586B] in [680] msec
   MD5 Indy_10:[E48FFC453C495B2F2EA2F33ACBC5586B] in [1488] msec
 
  If your intent is to benchmark the speed of different MD5 implementations I
  suggest that you add MD5 routines from the DcpCrypt package [1] into your
  comparison list. When I compared it to ICS v5 on my machine some time ago
  it
  was faster than ICS.
 
  Also it would be great if your tool would output both processing time
  (wall
  clock time) and used CPU time (kernel + user time, see [2]).
 
  Just my personal suggestions.
 
  Tobias
 
 
  [1] http://www.cityinthesky.co.uk/cryptography.html
  [2] http://msdn.microsoft.com/en-us/library/ms683223(VS.85).aspx
   --
 
 --
 To unsubscribe or change your settings for TWSocket mailing list
 please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
 Visit our website at http://www.overbyte.be
--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be

Re: [twsocket] FileMD5 : Different Hash Result - same File ondifferent workstation

2009-06-24 Thread Arno Garrels
ineic...@triple-m.ch wrote:

 Face this: On this client some files (not all!) had a different md5
 hash. But this everytime with all tools!
 After a while i did a reboot - and guess: everything was as expected.
 Maybe Piotr was right with some harware issue. Very very strange!

Yes, this looks like a RAM issue, if so the computer or applications 
should crash or fail randomly as well and files could get corrupted.
I suggest you run Memtest86  from http://www.memtest.org/ or
http://www.memtest86.com/.  If it doesn't detect an error during the first
fast tests, run the entire test suite in a loop over night, that should detect
it.

--
Arno Garrels


--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] FileMD5 : Different Hash Result - same Fileondifferent workstat

2009-06-24 Thread Arno Garrels
Angus Robertson - Magenta Systems Ltd wrote:
 If your intent is to benchmark the speed of different MD5
 implementations
 
 You also have to allow for file caching.  I added buffered file
 access to the ICS v7 hashing units recently, and the difference
 between the first and subsequent runs can be 50 times different, once
 the file is cached by Windows.

I cannot find this in my local copy, AFAIK you added added buffered 
file access to the FTP components.

--
Arno Garrels


--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] FileMD5 : Different Hash Result - same

2009-06-24 Thread Piotr Dałek
Hello!

 ineic...@triple-m.ch wrote:

 Face this: On this client some files (not all!) had a different md5
 hash. But this everytime with all tools!
 After a while i did a reboot - and guess: everything was as expected.
 Maybe Piotr was right with some harware issue. Very very strange!

 Yes, this looks like a RAM issue, if so the computer or applications 
 should crash or fail randomly as well and files could get corrupted.
 I suggest you run Memtest86  from http://www.memtest.org/ or
 http://www.memtest86.com/. [..]

Or Google for OCCT or StressPrime. These tools should help, too. 

-- 
Piotr Dałek
enigmati...@interia.pl

--
Dobra czy zla wiadomosc? Zawsze warto oszczedzac. Teraz 5,5%. 
Sprawdź  http://link.interia.pl/f221b


--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] ICS group on social networks LinkedIn and FaceBook

2009-06-24 Thread Arno Garrels
Francois PIETTE wrote:
 Hi !
 
 Every ICS user is invited to be part of ICS-group on Linked-In.
 See http://www.linkedin.com/e/gis/136245
 Why ?
 Just to have a little bit more visibility for everyone of us and for 
 ICS. 
 
 There is another one on FaceBook:
 http://www.facebook.com/pages/ICS-Internet-Component-Suite/39493622127
 
 btw: You may also be part of Powered by Delphi group on Linked-In.
 http://www.linkedin.com/e/gis/48600

What about some ICS-content at Wikipedia?  
http://en.wikipedia.org/wiki/ICS

I offer to translate it to German.

--
Arno Garrels  



--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] FileMD5 : Different Hash Result - same Fileondifferent workstat

2009-06-24 Thread Angus Robertson - Magenta Systems Ltd
 I cannot find this in my local copy, AFAIK you added added buffered 
 file access to the FTP components.

I added FtpFileMD5 and FtpFileCrc32B to OverbyteIcsFtpSrvT.pas, to avoid
brings OverbyteIcsStreams into the MD5 and CRC32 units, but there's
nothing specifically 'FTP' about them, except the name and unit g

They are used in OverbyteIcsMD5Test which compares the buffered and
non-buffered versions.   I believe the buffered stream version is faster
on a first read, but no different once Windows has cached the file.
Windows caching makes comparsions very difficult. 

Angus

--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] FileMD5 : Different Hash Result - sameFileondifferent workstat

2009-06-24 Thread Arno Garrels
Angus Robertson - Magenta Systems Ltd wrote:
 I cannot find this in my local copy, AFAIK you added added buffered
 file access to the FTP components.
 
 I added FtpFileMD5 and FtpFileCrc32B to OverbyteIcsFtpSrvT.pas, to
 avoid brings OverbyteIcsStreams into the MD5 and CRC32 units, but
 there's nothing specifically 'FTP' about them, except the name and
 unit g 

Ah OK, I think this is a good choice, since usually you won't calculate 
the MD5 checksum of the same file multiple times in sequence. 
 
 They are used in OverbyteIcsMD5Test which compares the buffered and
 non-buffered versions.   I believe the buffered stream version is
 faster on a first read, but no different once Windows has cached the
 file. Windows caching makes comparsions very difficult.

That's true, it becomes even more difficult to compare cached and 
non-cached writes.

--
Arno Garrels


--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] FileMD5 : Different Hash Result -sameFileondifferent workstat

2009-06-24 Thread Arno Garrels
Arno Garrels wrote:
 Angus Robertson - Magenta Systems Ltd wrote:
 I cannot find this in my local copy, AFAIK you added added buffered
 file access to the FTP components.
 
 I added FtpFileMD5 and FtpFileCrc32B to OverbyteIcsFtpSrvT.pas, to
 avoid brings OverbyteIcsStreams into the MD5 and CRC32 units, but
 there's nothing specifically 'FTP' about them, except the name and
 unit g
 
 Ah OK, I think this is a good choice, since usually you won't
 calculate the MD5 checksum of the same file multiple times in
 sequence. 
 
 They are used in OverbyteIcsMD5Test which compares the buffered and
 non-buffered versions.   I believe the buffered stream version is
 faster on a first read, but no different once Windows has cached the
 file. Windows caching makes comparsions very difficult.
 
 That's true, it becomes even more difficult to compare cached and
 non-cached writes.

Just a quick shot: Maybe Chunksize can be made a parameter? I guess 
that this could replace the buffered stream IO and make it even faster, 
provided Chunksize was large enough. Knowing the Chunksize would
IMO also ease and speed up progress calculations in a callback 
routine, ProgressBar isn't aware of int64.  

--
Arno Garrels
--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


[twsocket] Converting an IIS/ASP3 site to an ICS web application

2009-06-24 Thread Angus Robertson - Magenta Systems Ltd
I've just finished converting a 10 year old web site that previously ran
on Microsoft IIS to a full Delphi web application using the new
THttpAppSrv web application server, and thought some comments might be of
interest.  

Old Technology
--
The old site ran on Microsoft IIS/5/6/7 using ASP v3 VBScript pages,
supported by Delphi COM objects for DNS lookups and non-SQL database
lookups, and a Delphi ISAPI Filter (PassDir) for authentication
restricting paid members to certain sub-directories.  It also used
various Microsoft COM objects, to send email, look-up file tile stamps,
etc.  Many of the site static pages were created offline by a Delphi
application from a non-SQL database, originating from various CSV, HTML
and Excel files.  

The site was originally on a shared web server at a hosting facility that
allowed COM objects and filters to be installed, which not everyone does.
The original site is at:

http://www.magsys.co.uk/telecom/

New Technology
--
The new site is a Delphi web application, written with ICS v7 and Delphi
2007, using the THttpAppSrv, THttpServer and TSmtpCli components.
The new site is on my own hosted server (as is the old site now) at: 

http://www.telecom-tariffs.co.uk/

The main reason for the conversion to Delphi was maintainability.  The
old site had a mix of technologies and languages, and updating the COM
objects and ISAPI Filters was not easy.  I did look at converting to
ASPX/.NET using Delphi .NET or Prism, but it's a major learning curve
with a massive rewrite necessary, and dependence upon ever changing
Microsoft runtimes.  I do have a commercial .NET application on my server,
and it takes up to 30 seconds to wake up and offer the index page, unless
accessed regularly to keep it in memory. 

Create a Web Server
---
Before the site could be converted, I needed a base web application
server, which means hanging a lot of code around the THttpServer
component.  Servers must run as Windows services, and I use the proven
SvCom environment that allows debugging and running under Delphi and
deployment as a service.  I added a configuration file, debug log files,
and W3C extended log files acceptable to web statistics analysis
applications.  I had to update both OverbyteIcsHttpSrv and
OverbyteIcsWSocket to get an event showing how much data was actually
sent to the client when the request completed and with the result code. I
also added content encoding since some of my static pages are 300K of
HTML that compress down to 20K, speeding up downloads. 

Converting the Site
---
ASP pages generally comprise both server side code (VBScript) and the
HTML and often client side code (Javascript) in the same file, in the
public web directory.  An ICS web application still has a public root for
static HTML pages, images and other files, then a template directory for
dynamic pages comprising pure HTML and server side code, with the server
side code in a Delphi unit.  

My ASP included dynamic content with the HTML tag %=name% where name
could be a variable or function name.  For ICS, these tags become #name
which are replaced by the ICS function HtmlPageProducerToStream with
application content.  I also have server side includes (SSI) in ASP pages,
ie !--#include file=addcopy.inc-- inserts a file at that point in the
page, which I changed to #addcopyinc and then loaded the file into a
string of similar name which is returned dynamically.  
  
Each dynamic page with a template needs a matching UrlHandler class:

TUrlHandlerTcomlink = class(TUrlHandler)
public
procedure Execute; override;
end;

which is added to the application server GET or POST lists: 

AddGetHandler('/tcomlink.htm', TUrlHandlerTcomlink);

then the actual code is simple for this page which shows the file time
stamp for the template, and two SSIs: 

procedure TUrlHandlerTcomlink.Execute;
begin
  AnswerPage('', NO_CACHE, 'tcomlink.htm', nil,
   ['PageLastMod', GetTempLastMod (Client, 'tcomlink.htm'),
'OtherLinksInc', SsiOtherLinksInc,
'AddCopyInc', SsiAddCopyInc ]);
  Finish;
end;

GetTempLastMod is a function that checks the file and format the date
into a string. In the response, NO_CACHE is literal for a header to stop
the page being cached, but other for pages I add cookies to this header.
The [] parameters are paired, first being the tag name, then the variable
for replacement, three in this example. 

Other pages need more complicated UrlHandlers, the web application has a
server information page at:  

http://www.telecom-tariffs.co.uk/serverinfo.htm

that uses TWSocket and a timer to look-up the client host name with a
five second timeout to avoid long DNS delays: 

   TUrlHandlerServerInfo = class(TUrlHandler)
private
WSocket: TWSocket;
AbortTimer: TTimer;
sIPAddr: string ;
sUserIPHost: string ;
public
destructor  Destroy; override;
procedure Execute; override;
procedure 

Re: [twsocket] Converting an IIS/ASP3 site to an ICS web application

2009-06-24 Thread Arno Garrels
Angus Robertson - Magenta Systems Ltd wrote:
 I've just finished converting a 10 year old web site that previously
 ran on Microsoft IIS to a full Delphi web application using the new
 THttpAppSrv web application server, and thought some comments might
 be of interest.

Thanks for sharing your experience! I think this new class also makes 
writing webbased admin interfaces much easier, thanks Francois for 
giving it as part of ICS!  

--
Arno Garrels
--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be