資源簡介
需把以下信息修改為自己申請的公眾號的信息( 代碼在WeiXinTest項目中BasePage.cs中) 這行代碼
//獲取appId,appSecret的配置信息
string appId = "wx12345678****";
string appSecret = "25f9e794323b453885f****";
string redirecturl = HttpContext.Current.Request.Url.ToString();//這里需要改成 你在微信授權(quán)的 url網(wǎng)址,否則會提示 redirect_uri 參數(shù)錯誤
代碼片段和文件信息
using?System;
using?System.Collections.Generic;
using?System.Collections.Specialized;
using?System.IO;
using?System.Linq;
using?System.Net;
using?System.Text;
using?System.Text.Regularexpressions;
using?System.Threading.Tasks;
using?System.Web;
namespace?WeiXinOAuth
{
????public?abstract?class?baseOAuth
????{
????????#region?內(nèi)部使用函數(shù)??
????????///???
????????///?GET請求??
????????///? ??
????????///???
????????///? ??
????????protected?string?GetRequest(string?url)
????????{
????????????HttpWebRequest?httpWebRequest?=?System.Net.WebRequest.Create(url)?as?HttpWebRequest;
????????????httpWebRequest.Method?=?“GET“;
????????????httpWebRequest.ServicePoint.Expect100Continue?=?false;
????????????StreamReader
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2016-11-24?13:24??packages\
?????目錄???????????0??2016-11-24?13:24??packages\Microsoft.ApplicationInsights.2.1.0\
?????目錄???????????0??2016-11-24?13:24??packages\Microsoft.ApplicationInsights.2.1.0\lib\
?????目錄???????????0??2016-11-24?13:24??packages\Microsoft.ApplicationInsights.2.1.0\lib\dotnet5.4\
?????文件??????162040??2016-06-06?10:42??packages\Microsoft.ApplicationInsights.2.1.0\lib\dotnet5.4\Microsoft.ApplicationInsights.dll
?????文件??????151938??2016-06-06?10:42??packages\Microsoft.ApplicationInsights.2.1.0\lib\dotnet5.4\Microsoft.ApplicationInsights.xm
?????目錄???????????0??2016-11-24?13:24??packages\Microsoft.ApplicationInsights.2.1.0\lib\net40\
?????文件??????165624??2016-06-06?10:42??packages\Microsoft.ApplicationInsights.2.1.0\lib\net40\Microsoft.ApplicationInsights.dll
?????文件??????160494??2016-06-06?10:42??packages\Microsoft.ApplicationInsights.2.1.0\lib\net40\Microsoft.ApplicationInsights.xm
?????目錄???????????0??2016-11-24?13:24??packages\Microsoft.ApplicationInsights.2.1.0\lib\net45\
?????文件??????163576??2016-06-06?10:42??packages\Microsoft.ApplicationInsights.2.1.0\lib\net45\Microsoft.ApplicationInsights.dll
?????文件??????160924??2016-06-06?10:42??packages\Microsoft.ApplicationInsights.2.1.0\lib\net45\Microsoft.ApplicationInsights.xm
?????目錄???????????0??2016-11-24?13:24??packages\Microsoft.ApplicationInsights.2.1.0\lib\net46\
?????文件??????166648??2016-06-06?10:42??packages\Microsoft.ApplicationInsights.2.1.0\lib\net46\Microsoft.ApplicationInsights.dll
?????文件??????168453??2016-06-06?10:42??packages\Microsoft.ApplicationInsights.2.1.0\lib\net46\Microsoft.ApplicationInsights.xm
?????目錄???????????0??2016-11-24?13:24??packages\Microsoft.ApplicationInsights.2.1.0\lib\portable-win81+wpa81\
?????文件??????145656??2016-06-06?10:42??packages\Microsoft.ApplicationInsights.2.1.0\lib\portable-win81+wpa81\Microsoft.ApplicationInsights.dll
?????目錄???????????0??2016-11-24?13:24??packages\Microsoft.ApplicationInsights.2.1.0\lib\uap10.0\
?????文件??????145656??2016-06-06?10:42??packages\Microsoft.ApplicationInsights.2.1.0\lib\uap10.0\Microsoft.ApplicationInsights.dll
?????目錄???????????0??2016-11-24?13:24??packages\Microsoft.ApplicationInsights.2.1.0\lib\wp8\
?????文件??????144624??2016-06-06?10:42??packages\Microsoft.ApplicationInsights.2.1.0\lib\wp8\Microsoft.ApplicationInsights.dll
?????文件??????532756??2016-11-24?13:24??packages\Microsoft.ApplicationInsights.2.1.0\Microsoft.ApplicationInsights.2.1.0.nupkg
?????目錄???????????0??2016-11-24?13:24??packages\Microsoft.ApplicationInsights.Agent.Intercept.1.2.1\
?????目錄???????????0??2016-11-24?13:24??packages\Microsoft.ApplicationInsights.Agent.Intercept.1.2.1\lib\
?????目錄???????????0??2016-11-24?13:24??packages\Microsoft.ApplicationInsights.Agent.Intercept.1.2.1\lib\net40\
?????文件?????1840368??2015-12-07?19:04??packages\Microsoft.ApplicationInsights.Agent.Intercept.1.2.1\lib\net40\Microsoft.AI.Agent.Intercept.dll
?????目錄???????????0??2016-11-24?13:24??packages\Microsoft.ApplicationInsights.Agent.Intercept.1.2.1\lib\net45\
?????文件?????1839344??2015-12-07?19:04??packages\Microsoft.ApplicationInsights.Agent.Intercept.1.2.1\lib\net45\Microsoft.AI.Agent.Intercept.dll
?????文件?????1453471??2016-11-24?13:24??packages\Microsoft.ApplicationInsights.Agent.Intercept.1.2.1\Microsoft.ApplicationInsights.Agent.Intercept.1.2.1.nupkg
?????目錄???????????0??2016-11-24?13:24??packages\Microsoft.ApplicationInsights.DependencyCollector.2.1.0\
?????目錄???????????0??2016-11-24?13:24??packages\Microsoft.ApplicationInsights.DependencyCollector.2.1.0\content\
............此處省略205個文件信息
- 上一篇:dvg控件使用和泛型集合的應(yīng)用
- 下一篇:C#常用基礎(chǔ)類
評論
共有 條評論