91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

  • 大小: 677KB
    文件類(lèi)型: .rar
    金幣: 2
    下載: 0 次
    發(fā)布日期: 2021-05-13
  • 語(yǔ)言: C#
  • 標(biāo)簽: C#微信??

資源簡(jiǎn)介

微信公眾號(hào)開(kāi)發(fā).NET源碼親測(cè)可用,修改Web.config文件的 和interfaceTest.ashx文件的const string token = "token值";然后發(fā)布放到服務(wù)器上,微信公眾測(cè)試號(hào)上輸入服務(wù)器URL(http://***/interfaceTest.ashx)和token值,提交成功后掃描測(cè)試號(hào)二維碼,自動(dòng)回復(fù)“謝謝關(guān)注微信01”,適合初學(xué)者

資源截圖

代碼片段和文件信息

using?System;
using?System.Collections;
using?System.Configuration;
using?System.Data;
using?System.Web;
using?System.Web.Security;
using?System.Web.UI;
using?System.Web.UI.HtmlControls;
using?System.Web.UI.WebControls;
using?System.Web.UI.WebControls.WebParts;
using?System.xml;
using?System.IO;
using?System.Text;
using?System.Collections.Generic;
using?System.Net;

namespace?weixin_api
{
????public?partial?class?createMenu?:?System.Web.UI.Page
????{
????????protected?void?Page_Load(object?sender?EventArgs?e)
????????{
????????????FileStream?fs1?=?new?FileStream(Server.MapPath(“.“)+“\\menu.txt“?FileMode.Open);
????????????StreamReader?sr?=?new?StreamReader(fs1?Encoding.GetEncoding(“GBK“));
????????????string?menu?=?sr.ReadToEnd();
????????????sr.Close();
????????????fs1.Close();
????????????GetPage(“https://api.weixin.qq.com/cgi-bin/menu/create?access_token=access_token“?menu);
????????}
????????public?string?GetPage(string?posturl?string?postData)
????????{
????????????Stream?outstream?=?null;
????????????Stream?instream?=?null;
????????????StreamReader?sr?=?null;
????????????HttpWebResponse?response?=?null;
????????????HttpWebRequest?request?=?null;
????????????Encoding?encoding?=?Encoding.UTF8;
????????????byte[]?data?=?encoding.GetBytes(postData);
????????????//?準(zhǔn)備請(qǐng)求...
????????????try
????????????{
????????????????//?設(shè)置參數(shù)
????????????????request?=?WebRequest.Create(posturl)?as?HttpWebRequest;
????????????????CookieContainer?cookieContainer?=?new?CookieContainer();
????????????????request.CookieContainer?=?cookieContainer;
????????????????request.AllowAutoRedirect?=?true;
????????????????request.Method?=?“POST“;
????????????????request.ContentType?=?“application/x-www-form-urlencoded“;
????????????????request.ContentLength?=?data.Length;
????????????????outstream?=?request.GetRequestStream();
????????????????outstream.Write(data?0?data.Length);
????????????????outstream.Close();
????????????????//發(fā)送請(qǐng)求并獲取相應(yīng)回應(yīng)數(shù)據(jù)
????????????????response?=?request.GetResponse()?as?HttpWebResponse;
????????????????//直到request.GetResponse()程序才開(kāi)始向目標(biāo)網(wǎng)頁(yè)發(fā)送Post請(qǐng)求
????????????????instream?=?response.GetResponseStream();
????????????????sr?=?new?StreamReader(instream?encoding);
????????????????//返回結(jié)果網(wǎng)頁(yè)(html)代碼
????????????????string?content?=?sr.ReadToEnd();
????????????????string?err?=?string.Empty;
????????????????Response.Write(content);
????????????????return?content;
????????????}
????????????catch?(Exception?ex)
????????????{
????????????????string?err?=?ex.Message;
????????????????return?string.Empty;
????????????}
????????}
????}
}


?屬性????????????大小?????日期????時(shí)間???名稱(chēng)
-----------?---------??----------?-----??----

?????文件?????436224??2015-08-24?14:05??weixin_api\weixin_api\bin\Newtonsoft.Json.dll

?????文件?????504032??2015-08-24?14:05??weixin_api\weixin_api\bin\Newtonsoft.Json.xml

?????文件??????16384??2017-09-12?16:56??weixin_api\weixin_api\bin\weixin_api.dll

?????文件??????46592??2017-09-12?16:56??weixin_api\weixin_api\bin\weixin_api.pdb

?????文件???????2486??2017-09-12?13:54??weixin_api\weixin_api\Common\CommonMethod.cs

?????文件???????2740??2017-09-12?13:36??weixin_api\weixin_api\Common\HttpGetPost.cs

?????文件????????966??2017-09-12?13:35??weixin_api\weixin_api\Common\Jsonhelper.cs

?????文件????????418??2017-09-12?13:26??weixin_api\weixin_api\Common\tokenInfo.cs

?????文件????????372??2017-09-12?13:35??weixin_api\weixin_api\Common\WeixinUrl.cs

?????文件????????449??2014-03-26?13:52??weixin_api\weixin_api\createMenu.aspx

?????文件???????2739??2014-03-26?14:54??weixin_api\weixin_api\createMenu.aspx.cs

?????文件????????808??2014-03-26?13:52??weixin_api\weixin_api\createMenu.aspx.designer.cs

?????文件????????104??2014-03-26?13:53??weixin_api\weixin_api\interfaceTest.ashx

?????文件???????5698??2017-09-14?14:45??weixin_api\weixin_api\interfaceTest.ashx.cs

?????文件????????734??2014-03-26?16:02??weixin_api\weixin_api\menu.txt

?????文件???????7420??2017-09-12?16:56??weixin_api\weixin_api\messageHelp.cs

?????文件???????7029??2017-09-14?14:44??weixin_api\weixin_api\obj\Debug\DesignTimeResolveAssemblyReferencesInput.cache

?????文件?????436224??2015-08-24?14:05??weixin_api\weixin_api\obj\Debug\Package\PackageTmp\bin\Newtonsoft.Json.dll

?????文件?????504032??2015-08-24?14:05??weixin_api\weixin_api\obj\Debug\Package\PackageTmp\bin\Newtonsoft.Json.xml

?????文件??????16384??2017-09-12?16:56??weixin_api\weixin_api\obj\Debug\Package\PackageTmp\bin\weixin_api.dll

?????文件??????46592??2017-09-12?16:56??weixin_api\weixin_api\obj\Debug\Package\PackageTmp\bin\weixin_api.pdb

?????文件????????449??2014-03-26?13:52??weixin_api\weixin_api\obj\Debug\Package\PackageTmp\createMenu.aspx

?????文件????????104??2014-03-26?13:53??weixin_api\weixin_api\obj\Debug\Package\PackageTmp\interfaceTest.ashx

?????文件????????734??2014-03-26?16:02??weixin_api\weixin_api\obj\Debug\Package\PackageTmp\menu.txt

?????文件?????239835??2014-03-26?13:52??weixin_api\weixin_api\obj\Debug\Package\PackageTmp\scripts\jquery-1.4.1-vsdoc.js

?????文件?????168792??2014-03-26?13:52??weixin_api\weixin_api\obj\Debug\Package\PackageTmp\scripts\jquery-1.4.1.js

?????文件??????71922??2014-03-26?13:52??weixin_api\weixin_api\obj\Debug\Package\PackageTmp\scripts\jquery-1.4.1.min.js

?????文件????????449??2014-03-26?13:53??weixin_api\weixin_api\obj\Debug\Package\PackageTmp\selectMenu.aspx

?????文件???????7563??2017-09-12?16:00??weixin_api\weixin_api\obj\Debug\Package\PackageTmp\Web.config

?????文件???????7567??2017-09-12?16:00??weixin_api\weixin_api\obj\Debug\TransformWebConfig\original\Web.config

............此處省略40個(gè)文件信息

評(píng)論

共有 條評(píng)論