Ejemplo n.º 1
0
        public virtual void ProcessRequest(HttpContext context)
        {
            context.Response.ContentType = "text/plain";
            Request  = context.Request;
            Response = context.Response;

            if (Utility._md5open == "1")
            {
                //验证请求是否合法
                string waitToken = key + ApiName + Action + DateTime.Today.ToString("yyyy-MM-dd");
                string mytoken   = CryptHelper.MD5_Encrypt(waitToken);
                if (!Token.ToLower().Equals(mytoken))
                {
                    ReturnErrorMsg("非法请求,验证失败");
                }
            }
        }