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里面,否则不工作。
|