最近2018中文字幕在日韩欧美国产成人片_国产日韩精品一区二区在线_在线观看成年美女黄网色视频_国产精品一区三区五区_国产精彩刺激乱对白_看黄色黄大色黄片免费_人人超碰自拍cao_国产高清av在线_亚洲精品电影av_日韩美女尤物视频网站

RELATEED CONSULTING
相關(guān)咨詢
選擇下列產(chǎn)品馬上在線溝通
服務(wù)時間:8:30-17:00
你可能遇到了下面的問題
關(guān)閉右側(cè)工具欄

新聞中心

這里有您想知道的互聯(lián)網(wǎng)營銷解決方案
微信開發(fā)中如何接入asp.net-創(chuàng)新互聯(lián)

這篇文章主要介紹微信開發(fā)中如何接入asp.net,文中介紹的非常詳細(xì),具有一定的參考價值,感興趣的小伙伴們一定要看完!

成都創(chuàng)新互聯(lián)專注于香河網(wǎng)站建設(shè)服務(wù)及定制,我們擁有豐富的企業(yè)做網(wǎng)站經(jīng)驗(yàn)。 熱誠為您提供香河營銷型網(wǎng)站建設(shè),香河網(wǎng)站制作、香河網(wǎng)頁設(shè)計、香河網(wǎng)站官網(wǎng)定制、重慶小程序開發(fā)公司服務(wù),打造香河網(wǎng)絡(luò)公司原創(chuàng)品牌,更為您提供香河網(wǎng)站排名全網(wǎng)營銷落地服務(wù)。

        首先創(chuàng)建一個Default.aspx。在Page_Load里進(jìn)行檢驗(yàn):(MyLog是日志類,可以忽略)   關(guān)于checkSignature()就和所查到的差不多了。這里貼一下。


 MyLog.DebugInfo("request default.aspx");
 String echoStr = Request.QueryString["echostr"];
 MyLog.DebugInfo("echoStr:"+echoStr);
 if (this.checkSignature())
 {
 if(!string.IsNullOrEmpty(echoStr)){
 MyLog.DebugInfo("echostr:" + echoStr);
 Response.Write(echoStr);
 Response.End();
 }
 
 }

最最主要的是那句Response.End(),不加這一句怎么樣都接不進(jìn)去(希望有大神告知)。 關(guān)于checkSignature()就和所查到的差不多了。這里貼一下

private bool checkSignature()
{
 
 string signature = Request["signature"];
 string timestamp = Request["timestamp"];
 string nonce = Request["nonce"];
 MyLog.DebugInfo(String.Format("signature:{0},timestamp:{1},nonce:{2}", signature, timestamp, nonce));
 string token = TOKEN;
 string[] tmpArr = new string[] { token, timestamp, nonce };
 Array.Sort(tmpArr);
 string tmpStr = string.Join("", tmpArr);
 //sha1加密
 System.Security.Cryptography.SHA1 sha1 = new System.Security.Cryptography.SHA1CryptoServiceProvider();
 byte[] secArr = sha1.ComputeHash(System.Text.Encoding.Default.GetBytes(tmpStr));
 tmpStr = BitConverter.ToString(secArr).Replace("-", "").ToLower();
 MyLog.DebugInfo(String.Format("after parse:{0}", tmpStr));
 if (tmpStr == signature)
 {
 MyLog.DebugInfo("true");
 return true;
 }
 else
 {
 return false;
 }

以上是“微信開發(fā)中如何接入asp.net”這篇文章的所有內(nèi)容,感謝各位的閱讀!希望分享的內(nèi)容對大家有幫助,更多相關(guān)知識,歡迎關(guān)注創(chuàng)新互聯(lián)行業(yè)資訊頻道!


本文標(biāo)題:微信開發(fā)中如何接入asp.net-創(chuàng)新互聯(lián)
本文路徑:http://fisionsoft.com.cn/article/dsdpci.html