0
我想知道如何让用户使用WebClient类登录到xbox.com。到目前为止我已经得到了以下代码,但是我得到了不正确的密码/用户组合错误。使用ASP.NET WebClient在xbox.com上登录用户?
NameValueCollection formData = new NameValueCollection();
formData["login"] = "username";
formData["passwd"] = "pass";
string url = "https://login.live.com/ppsecure/post.srf?wa=wsignin1.0&rpsnv=11&ct=1294985876&rver=6.0.5286.0&wp=MBI&wreply=https://live.xbox.com:443/xweb/live/passport/setCookies.ashx%3Frru%3Dhttp%253a%252f%252fwww.xbox.com%252fen-US%252f&lc=1033&cb=reason%3D0%26returnUrl%3Dhttp%253a%252f%252fwww.xbox.com%252fen-US%252f&id=66262&bk=1294986379";
WebClient webClient = new WebClient();
byte[] responseBytes = webClient.UploadValues(url, "POST", formData);
string response = Encoding.UTF8.GetString(responseBytes);
Response.Write(response);
我需要执行一些JavaScript来验证用户吗?另外,请让我知道我应该如何处理饼干。我不熟悉CookieContainers。非常感谢。
我决定不担心在这个时候获得所有成就数据。我只是阅读公共gamercard页面并在我的网站上显示。我会尽快得到XBCDP的官方支持。 – 2011-01-29 19:11:24