本人的公众号要申请成为开发者,必须经过token认证。微信公众号的官方代码只列出了PHP代码的实例,明显是歧视.net用户。我用的asp.net mvc中的web api,结果调了好久都没有成功,最后发现只要下面几句即可:

public void Get()
{
     string temp = HttpContext.Current.Request.QueryString["echostr"];
     HttpContext.Current.Response.Write(temp);
     HttpContext.Current.Response.End();
}

 

posted on 2014-11-14 21:16  格斗人-HelpQY  阅读(546)  评论(0编辑  收藏  举报