超时了吧,Session值为空,使用Session时要注意判断是否为null才ToString
if(Session["username"]==null) { Resposne.Write('已经超时,请重新登录系统!'); Response.End(); } else zs.QueryLog(......);