added @HttpUtility.UrlEncode calls to fix handling of unsafe url characters