从网站登录到另一个站点的HTTPS [英] Login from a site to another site in https
问题描述
我是新来的StackOverflow,我有一个问题想问你:
i'm new to stackoverflow and I have a question for you:
我必须从我的wesite做一个自动登录到其他外部网站(不是我)。
I have to do an automatic login from my wesite to another external website (not mine).
本网站使用https,当我在网站上的地址去这问我(与经典弹出的形式),输入用户名和密码。
我试图做一个POST这样
This site use https and when i go on the site address it ask me (with the classical popup form) to enter username and password. I've tried to do a POST in this way
的http://www.terminally-incoherent.com/blog/2008/05/05/send-a-https-post-request-with-c/
其中字符串post_data我已经把用户名= XXXX和放大器;密码= XXXX
where in the string post_data I have put "Username=xxxx&Password=xxxx"
但不工作;在code退换是401:未经授权
but doesn't work; the code returned was 401: Unauthorized.
有什么建议?
感谢您!
推荐答案
您需要设置凭据?的http://msdn.microsoft.com/en-us/library/system.net.httpwebrequest.credentials.aspx
这篇关于从网站登录到另一个站点的HTTPS的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!