The Wiert Corner – irregular stream of stuff

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

  • My work

  • My badges

  • Twitter Updates

  • My Flickr Stream

    20140508-Delphi-2007--Project-Options--Cannot-Edit-Application-Title-HelpFile-Icon-Theming

    20140430-Fiddler-Filter-Actions-Button-Run-Filterset-now

    20140424-Windows-7-free-disk-space

    More Photos
  • Pages

  • All categories

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

    Join 1,721 other followers

Archive for March 3rd, 2016

Windows Server Container Manager

Posted by jpluimers on 2016/03/03

Cool: Windows Server Container Manager

Posted in Uncategorized | 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 »

 
%d bloggers like this: