Using dal;using models;using system.web.sessionstate;namespace cleaner.ashx{//<summary>//$codebehindclas Sname$ 's summary description///</summary> [WebService (Namespace = "http://tempuri.org/")] [webservicebinding (ConformsTo = Wsiprofiles.basicprofile1_1)] public class Userlogin:ihttphandler, irequiressessionstate {public void Pro Cessrequest (HttpContext context) {context. Response.ContentType = "Text/plain"; String str = "false"; if (context. session["Username"]! = NULL) {context. Response.Redirect ("backindex.aspx"); Context. Response.End (); } string username = context. request["username"];//receive account if (!string. IsNullOrEmpty (username)) {string pwd = context. request["pwd"];//receive password if (!string. IsNullOrEmpty (PWD)) {str = CHECKNAMEPWD (username, pwd); } } context. Response.Write (str); }
C # ashx Background processing session errors