不发送process.start凭据 [英] process.start credentials aren't sent
本文介绍了不发送process.start凭据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我从谷歌浏览器登录mturk.com。
然后我尝试从该网站下载:
I logon to mturk.com from Google Chrome.
Then I try to download from that site:
Dim HTML As String
Dim texttosend As String = "https://www.mturk.com/mturk/viewhits"
Dim res As Byte() = web.DownloadData(texttosend)
HTML = System.Text.Encoding.ASCII.GetString(res)
...但返回HTML好像我没有登录。为什么我不能冒充自己呢?
答案1包括[/编辑]
谢谢戴夫......嗯。 ..由于某种原因,我没有意识到我需要那个。
所以我尝试添加:
... but the returned html is as if I hadn''t logged on. Why can''t I impersonate myself?
Answer 1 included[/EDIT]
Thanks Dave...hmmm... for some reason I didn''t realize I needed that.
So I tried adding:
Dim texttosend As String = "https://www.mturk.com/mturk/viewhits"
Dim web As New System.Net.WebClient
web.Credentials = System.Net.CredentialCache.DefaultCredentials
Dim res As Byte() = web.DownloadData(texttosend)
dim HTML as string = System.Text.Encoding.ASCII.GetString(res)
......但这没有用。 HTML文本仍然是我没有凭据的结果。
我在这里没有使用process.start。我需要吗?
提前致谢
... but that doesn''t help. The HTML text is still what I would get without the credentials.
I''m not using process.start here. Do I need to?
Thanks in advance
推荐答案
是的,抱歉,我的帖子的标题与这个问题不符。
基本上,我正在尝试访问需要凭据的网站。这些凭证作为另一个网站输入。但我已经在我的机器上登录了该站点。我是否可以告诉vb.net这种情况并且它应该在网络下载中使用现有的会话?
谢谢
Yes, sorry, the title of my post did not match the question.
Basically, I''m trying to reach a website that needs credentials. Those credentials are entered as still a different website. But I am already logged into that site on my machine. Can I not tell vb.net that that is the case and that it should use the existing session in a web download?
Thanks
这篇关于不发送process.start凭据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文