Fixing issue where exception handling code would throw an exception when attempting to parse PageId or SiteId from HttpContext.