在一般应用处理程序中不能直接使用session。 要引入using System.Web.SessionState; 要在class中引入IHttpHandler,IReadOnlySessionState 然后,才能使用seesion