http://zhenkm0507.iteye.com/blog/546805
看不懂,图都打不开啊
@哇~怪兽: 其实我也不懂,就是看你分高来凑个热闹!哈哈
@刘宏玺: 晕。。。
https://github.com/Jasig/dotnet-cas-client 完整版demo,模仿吧~
没模仿明白,还是求代码吧
@哇~怪兽: 没模仿明白,那估计给你代码你还是不明白。demo里面的代码就应该已经很完整了吧,没明白就争取搞明白哇。
这么多圆豆,帮顶。
3Q
微信开发?下面是静默授权代码
string url = "https://api.weixin.qq.com/sns/oauth2/access_token?appid=" + APPID + "&secret=" + APPSCRECT + "&code=" + code + "&grant_type=authorization_code";
HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url);
request.Method = "Get";
HttpWebResponse response = (HttpWebResponse)request.GetResponse();
Stream responsestream = response.GetResponseStream();
StreamReader reader = new StreamReader(responsestream, Encoding.GetEncoding("utf-8"));
string json = reader.ReadToEnd();
reader.Close();
responsestream.Close();
//序列化成字典
//JavaScriptSerializer serializer = new JavaScriptSerializer();
//Dictionary<string, object> DicUserAuthorize = serializer.Deserialize<Dictionary<string, object>>(json);
//return DicUserAuthorize;
//序列化成对象
DataContractJsonSerializer js = new DataContractJsonSerializer(typeof(UserAuthorizeInfo));
using (MemoryStream ms = new MemoryStream(Encoding.UTF8.GetBytes(json)))
{
UserAuthorizeInfo obj = js.ReadObject(ms) as UserAuthorizeInfo;
return obj;
}
额。。你连问题都没弄明白
还是谢谢了,科普:http://baike.baidu.com/link?url=yWDD9HDWlu-JwOmBN4YJJBpTSPA2VmkMQyLmgFfA8ng9FqBvS62XcX7mmBcnSO_vgNUgmemjQbmgVsdIxWEtEq
@哇~怪兽:好吧,我没仔细看
问题要描述清楚一点…
自己搞定了
可以获取到用户名和密码吗
怎么弄的,求支招