You just make your webmethod as static.
System.Web.Services.WebMethod]
public static void Test()
{
HttpContext.Current.Session.Abandon();
}
If not maked it static then PageMethods is undefind error raised from javascript. Except that static, all remaining part is ok.