无法获得MIcrosoft登录Html内容。 [英] Unable to get MIcrosoft Login Html Content.

查看:131
本文介绍了无法获得MIcrosoft登录Html内容。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨大家。

我正在尝试获取网页的HTML内容。

webclient wc = new webclient();

string html = wc.DownLoadtring( https://login.live.com/login.srf?wa=wsignin1.0& wtrealm = HTTP%3A%2F%2fcorp.sts.microsoft.com&安培; wctx = 7b4cd04b-7dc2-4880-9f77-20c8c6ef64c4&安培; WCT = 2013-03-11T06%3a54%3a42Z&安培; WHR = URI%3aWindowsLiveID [ ^ ]);

但是当我检查上面的字符串的htmo内容我得到错误消息

Hi Guys.
I am trying to get the HTML content of web page.
webclient wc = new webclient();
string html = wc.DownLoadtring("https://login.live.com/login.srf?wa=wsignin1.0&wtrealm=http%3a%2f%2fcorp.sts.microsoft.com&wctx=7b4cd04b-7dc2-4880-9f77-20c8c6ef64c4&wct=2013-03-11T06%3a54%3a42Z&whr=uri%3aWindowsLiveID[^]);
But when i examine the htmo content of above string i get error msg "

Microsoft account requires JavaScript to sign in. This web browser either does not support JavaScript, or scripts are being blocked.



我不明白如何处理这个问题。尝试使用httpwebrequest类,但结果相同.PLease帮助我....

"
I dont understand how to handle this. Tried Using httpwebrequest class also but same result.PLease help me on this....

推荐答案

Hi Muttaraj,



看起来你的代码运行良好!



这是你试图访问的网站的回复(在这种情况下是MS Live)。它尝试登录用户的网站,但你无法使用网络客户端。



WebClient 是(只是)一个HTTP客户端!

您可以做的是使用 WebBrowser 而它支持脚本。



干杯,

Edo
Hi Muttaraj,

Looks like your code is working well!

It''s a reply from the website you are trying to access (in this case MS Live). The web-site it trying to login the user but you are not able to do this with a webclient.

WebClient is (just) an HTTP client!
What you can do is use WebBrowser instead and it does support scripts.

Cheers,
Edo


这篇关于无法获得MIcrosoft登录Html内容。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆