[System.Web.Services.WebMethod(enableSession: true)]
public static PageMethodDefaultResult<T> funcName(T varName)
{
// do sth...
}
protected void Application_BeginRequest(object sender, EventArgs e)
{
HttpContext.Current.SetSessionStateBehavior(SessionStateBehavior.Required);
}