Subscribe
Search
Saturday
Mar102012

Web Application Warming

Original Issue: Web application is a bit unstable, restarting IIS seems to resolve issues for a few days.

Solution to original issue: Powershell script to restart application components including IIS in early hours of morning.

... A few weeks go by ...Users happy that application is significantly more stable during the day, however a small group of users complain about the performance of the application. Why is the performance suddenly dropping for those users?

First look at users issues: These users are always the first in the office, some appear not to sleep and decide to go to work at very early hours.

Root Cause: Now that we are restarting IIS, ASP.NET is recompiling the dynamic code when it is accessed for the first time, thus causing performance issues for first user hitting each part of the web site.

Solution 1: Use the Microsoft Web Application Warm up tool

Problem with Solution 1: Microsoft pulled the tool from their site

Solution 2: Write a script to handle this issue!

 

Writing a script for this solution was pretty easy:

  1. Get listing of all web pages which form application, put in file of format:
    index.aspx
    contact/contact_us.aspx

    The reason to do this is the application resides in multiple SDLC environments with different base URLs but the same relative paths
  2. Put the list from step 1 into a file
  3. Get the wget.exe from the gnuwin32 project. Why this and not the .net framework? Simply, put, from my experience the wget.exe was better at forcing all of the content to be loaded correctly in a manner a browser would. Go here for more info on the gnuwin32 project http://gnuwin32.sourceforge.net
  4. Based on the usual template:

Friday
Mar092012

Testing Ports are up

As usual, some more requests came to me, this time for soem monitoring, once again I took a look at the Script Centre and the Script Repositiory and found this very amazing cmdlet: http://gallery.technet.microsoft.com/scriptcenter/97119ed6-6fb2-446d-98d8-32d823867131

This is wonderful work as it allows you to not only test TCP ports, but also UDP ports. I will post up my monitoring script based upon this shortly.

 

Thursday
Mar082012

FQDN to IP

I needed to make a script resolve an hostname (FQDN) to the IP address, my first stop for most of these sorts of scripts is the Microsoft Script repository, where I found a lovely function to do just that!

Check out Get-IPAddress at http://gallery.technet.microsoft.com/scriptcenter/44e9fef7-a04b-40b3-bb05-97659e56e27e

Cheers out to Ben Wilkinson for his great work!

Wednesday
Mar072012

Incomming! lots of Powershell!

I have a small fleet of scripts to post in the coming weeks.

I am not posting them in full as that will take too much space, I may put some of these up in the download section but need to clearance to do so first.

For all the posts I have used my standard template that I have discussed previously and is available for download (here).

When I post the code there will be two sections

Parameters:

If i needed to add extra parameters from the default ones, they will be listed here.

Body:

Code here is in the body of the script and does the work

Tuesday
Nov082011

Infrastructure Saturday

Just a quick post to let everyone know that I will be presenting at this years Infrastructure Saturday (infrastructuresaturday.com). 

You can see my session at: http://www.infrastructuresaturday.com/session-details/

 

Understanding PKI and Certificate Services

Speaker: Kieran Jacobsen http://aperturescience.su 

Level: 200

In every organization there is a growing need for a strong well designed public key infrastructure solution and in many of these, Active Directory Certificate Services will be used. This session will guide you through a solution based on best practice, shed some light on common issues encountered and some shortcuts to assist in management through the use of PowerShell.