由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
DotNet版 - HTTP GET over SSL in C#
相关主题
How to read SSL Socket stream?A question on authentication and cookie
SSL certificatehexadecimal value 0x00, is an invalid ch
[合集] SSL certificatedefault !
HttpWebRequest小程序从国内连接 mitbbs
RSS 简介 Re: HttpWebRequest小程序How to tell if a connection is http or https?
问个c#的抓数据方面的问题how to download a https file
c#中如何设置HttpWebRequest的UserAgent属性[合集] How to tell if a connection is http or https?
网页中没有id的元素怎么submit?mid level SOFTWARE ENGINEER position in Rockville, MD (转载)
相关话题的讨论汇总
话题: ssl话题: get话题: http话题: am话题: proxy
进入DotNet版参与讨论
1 (共1页)
e****e
发帖数: 1775
1
This is driving me nuts!! Anyone, please help...
I would like to send an HTTP GET request to a server over SSL and I am using
System.Net.HttpWebRequest to do so. I have the valid certificate installed to
the Current User. That's for sure because I am able to access the same
resource using IE. But my code isn't working. Everytime it receives a
WebException, whose status is ConnectFailure, which means "The remote service
point could not be contacted at the transport level.", also whose message is
k****i
发帖数: 1072
2
Dont work too hard and wish you all a Merry Christmas




【在 e****e 的大作中提到】
: This is driving me nuts!! Anyone, please help...
: I would like to send an HTTP GET request to a server over SSL and I am using
: System.Net.HttpWebRequest to do so. I have the valid certificate installed to
: the Current User. That's for sure because I am able to access the same
: resource using IE. But my code isn't working. Everytime it receives a
: WebException, whose status is ConnectFailure, which means "The remote service
: point could not be contacted at the transport level.", also whose message is

e****e
发帖数: 1775
3
hehe :)
你给得如何设定empty proxy神奇的解决了我的问题,谢谢谢谢
by the way, 前面说得loading cert是optional的,只对client authentication有必要

你一定是知道得啦,写出来为了后来者:P。从server处获得的cert必须首先安装在受信任
德certificates store里面,否则不工作。

【在 k****i 的大作中提到】
: Dont work too hard and wish you all a Merry Christmas
:
: 要
: 任

k****i
发帖数: 1072
4
Feel better to use c# rather than unmanaged c++ now?

")

【在 e****e 的大作中提到】
: hehe :)
: 你给得如何设定empty proxy神奇的解决了我的问题,谢谢谢谢
: by the way, 前面说得loading cert是optional的,只对client authentication有必要
: ,
: 你一定是知道得啦,写出来为了后来者:P。从server处获得的cert必须首先安装在受信任
: 德certificates store里面,否则不工作。

e****e
发帖数: 1775
5
Thanx. will try it tomorrow.
BTW, do you know much about the certificates?
If I have imported a certificate to the Current User Personal store,
is there anything else I need to do in order to utilize this cert
when accessing via HTTPS?

【在 k****i 的大作中提到】
: Feel better to use c# rather than unmanaged c++ now?
:
: ")

e****e
发帖数: 1775
6
hehe :)
你给得如何设定empty proxy神奇的解决了我的问题,谢谢谢谢
by the way, 前面说得loading cert是optional的,只对client authentication有必要

你一定是知道得啦,写出来为了后来者:P。从server处获得的cert必须首先安装在受信任
德certificates store里面,否则不工作。

【在 k****i 的大作中提到】
: Feel better to use c# rather than unmanaged c++ now?
:
: ")

k****i
发帖数: 1072
7
set it to GlobalProxySelection.GetEmptyWebProxy()

【在 e****e 的大作中提到】
: hehe :)
: 你给得如何设定empty proxy神奇的解决了我的问题,谢谢谢谢
: by the way, 前面说得loading cert是optional的,只对client authentication有必要
: ,
: 你一定是知道得啦,写出来为了后来者:P。从server处获得的cert必须首先安装在受信任
: 德certificates store里面,否则不工作。

e****e
发帖数: 1775
8
hey, thanx for replying.
no i didn't
when debugging, i found out that the Proxy proterty of the instance
of HttpWebRequest is always our proxy server, no matter how I set
it or disabled it at IE. Then I tried to set this property with
a blank proxy:
req.Proxy = new WebProxy();
but it didn't help.
Now I am at home, am testing with the same server, it's an different
exception message I got. Instead of ConnectFailure, it's TrustFailure.
So I am sure now it's about the network settings I had at offi

【在 k****i 的大作中提到】
: set it to GlobalProxySelection.GetEmptyWebProxy()
k****i
发帖数: 1072
9
Dont work too hard and wish you all a Merry Christmas




【在 e****e 的大作中提到】
: hehe :)
: 你给得如何设定empty proxy神奇的解决了我的问题,谢谢谢谢
: by the way, 前面说得loading cert是optional的,只对client authentication有必要
: ,
: 你一定是知道得啦,写出来为了后来者:P。从server处获得的cert必须首先安装在受信任
: 德certificates store里面,否则不工作。

1 (共1页)
进入DotNet版参与讨论
相关主题
mid level SOFTWARE ENGINEER position in Rockville, MD (转载)RSS 简介 Re: HttpWebRequest小程序
同事的这个generic工厂interface让我蛋疼问个c#的抓数据方面的问题
is it possible to access sharepoint files from my current Web application?c#中如何设置HttpWebRequest的UserAgent属性
internet programming in C#网页中没有id的元素怎么submit?
How to read SSL Socket stream?A question on authentication and cookie
SSL certificatehexadecimal value 0x00, is an invalid ch
[合集] SSL certificatedefault !
HttpWebRequest小程序从国内连接 mitbbs
相关话题的讨论汇总
话题: ssl话题: get话题: http话题: am话题: proxy