The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My badges

  • Twitter Updates

  • My Flickr Stream

  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 4,230 other subscribers

Archive for the ‘IIS’ Category

Internet Information Server

How to properly cleanup/shutdown a Delphi ISAPI (which uses Threads) | Mathias Pannier programmiert

Posted by jpluimers on 2019/10/03

For my link archive:

If you use Threads or global Objects (which are created in the initialization section for example) You have to cleanup/shutdown them in the OnTerminate event of the ISAPI Application. If You destroy/shutdown them in the finalization section in a unit it could end up in a hanging application pool in IIS on shutdown/reuse and some windows event log entries.

//added
procedure DoTerminate;
begin
  //free global objects and wait/terminate threads here
end;
exports
  GetExtensionVersion,
  HttpExtensionProc,
  TerminateExtension;
begin
  ReportMemoryLeaksOnShutdown := true;
  CoInitFlags := COINIT_MULTITHREADED;
  Application.Initialize;
  Application.WebModuleClass := WebModuleClass;
  TISAPIApplication(Application).OnTerminate := DoTerminate; //added
  Application.Run;
end.

Source [WayBack] How to properly cleanup/shutdown a Delphi ISAPI (which uses Threads) | Mathias Pannier programmiert

Related:

–jeroen

Posted in Delphi, Development, IIS, Software Development | Leave a Comment »

Enabling IIS log files on Windows 7

Posted by jpluimers on 2019/10/01

Since each Windows version, Microsoft hides the way to first enable, then configure IIS Logging in a different place: [WayBack] Enabling IIS log files on Windows 7.

That should provide me some guidance on how to find it back when it is not displayed at all.

Related:

–jeroen

Posted in Development, IIS, Power User, Software Development, Windows | Leave a Comment »

UptimeRobot is written in PHP and runs on IIS

Posted by jpluimers on 2018/11/28

In [WayBackJeroen Pluimers‏ @jpluimers: Every now and then editing @uptimerobot entries failed. Just “HTTP Error 503.4 – Service Unavailable The FastCGI pool queue is full” 1/2 I found out that UptimeRobot:

There is also a maintenance page at uptimerobot.com/maintenance.php#tvMode [Archive.is] and uptimerobot.com/maintenance.php?c-e [Archive.is]. If you get to those, then retry in ~10 minutes as sometimes it takes that long for an update to be processed.

Sometimes setting up multiple Android devices for the same uptimerobot account can be a bit of a hassle: [WayBack] Uptime Robot on Twitter: “Once logged in to the account from another Andriod device, that device will be added as an alert contact too.… “.

All in all it is still a nice tool (:

–jeroen

Read the rest of this entry »

Posted in *nix, Development, IIS, Monitoring, PHP, Power User, Scripting, Software Development, Uptimerobot, Web Development | Leave a Comment »

stop/start IIS

Posted by jpluimers on 2016/03/03

I know, old knowledge, but I only recently added the below batch files to file collection.

Why? Because since a few Windows versions, the System process uses port 80 because IIS is installed by default in many configurations. And recently I had to do quote a bit of http communication work against a local machine outside the IIS realm.

windows 7 – Why is System process listening on Port 80? – Super User.

Stop IIS:

:: http://stackoverflow.com/questions/22084561/difference-between-iisreset-and-iis-stop-start-command
:checkPrivileges
  net file 1>nul 2>nul
  if '%errorlevel%' == '0' ( goto :gotPrivileges ) else ( goto :getPrivileges )

:isNotAdmin
:getPrivileges
  echo You need to be admin running with an elevated security token to run %0
  goto :exit

:isAdmin
:gotPrivileges
::  net stop w3svc
::  net stop iisadmin
  iisreset /stop

:exit
  ::pause
  exit /b

Start IIS:

:: http://stackoverflow.com/questions/22084561/difference-between-iisreset-and-iis-stop-start-command
:checkPrivileges
  net file 1>nul 2>nul
  if '%errorlevel%' == '0' ( goto :gotPrivileges ) else ( goto :getPrivileges )

:isNotAdmin
:getPrivileges
  echo You need to be admin running with an elevated security token to run %0
  goto :exit

:isAdmin
:gotPrivileges
::  net start w3svc
::  net start iisadmin
  iisreset /start

:exit
  ::pause
  exit /b

–jeroen

Posted in Batch-Files, Development, IIS, Scripting, Software Development | Leave a Comment »

logparser – Wikipedia, the free encyclopedia

Posted by jpluimers on 2015/07/31

Thanks to Sebastian Gingter for pointing me at Logparser:

Logparser […] powerful, versatile tool that provides universal query access to text-based data such as log files, XML files and CSV files, as well as key data sources on the Windows operating system such as the Event Log, the Registry, the file system, and Active Directory. The results of the input query can be custom-formatted in text based output, or they can be persisted to more specialty targets like SQL, SYSLOG, or a chart.

Common use:

$ logparser [options] [SQL expression]

–jeroen

via logparser – Wikipedia, the free encyclopedia.

Posted in Development, IIS, Power User, Windows, Windows 7, Windows 8, Windows 8.1, Windows 9, Windows Server 2003, Windows Server 2003 R2, Windows Server 2008, Windows Server 2008 R2, Windows Server 2012, Windows Server 2012 R2 | Leave a Comment »

 
%d bloggers like this: