blob.png

         protected void Page_Load(object sender, EventArgs e)
        {
            string type = "";
            if (Request.RequestType.ToUpper() == "GET")
            {
                type = "GET";
                NameValueCollection nvc = GETInput();
                if (nvc.Count != 0)
                {
                    for (int i = 0; i < nvc.Count; i++)
                    {
                        if (nvc.GetKey(i) == "echostr" && nvc.GetValues(i)[0] != "") //接收微信返回的token
                        {
                            Response.Write(nvc.GetValues(i)[0]);//直接输出微信返回的token
                        }

                    }
                }
            }

        }
        private NameValueCollection GETInput()
        {
            return Request.QueryString;
        }