B
bonnieliyl
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 as below,
The underlying connection was closed: Unable to connect to the remote
server.
Stack: at System.Net.HttpWebRequest.CheckFinalStatus()
at System.Net.HttpWebRequest.EndGetResponse(IAsyncResult
asyncResult)
at System.Net.HttpWebRequest.GetResponse()
I've tried to access both a server locating outside and inside of our
Intranet. The same thing happens that the request was sent to our proxy
server, no matter if I enable or disable the proxy settings at IE. It
should be sent straight to the right destination!
I was using Ethereal to capture the packets. While in the case of using
IE when it's working properly, no matter how the proxy is set, if the
url contains a DNS name, it at first looks up to the DNS server,
returns the proper IP address, and then the packets are sent between my
own computer and the server directly, over SSLv3. But with my code, it
never goes that far. It always connects to the proxy and ofcourse the
program got bounced with error message!
Really don't understand
1) why the proxy is always playing there even after I've disabled it?
or
2) it's said that HttpWebRequest is using the same network settings
with IE but seems it isn't?
3) with unmanaged C++, it's quite simple by just setting one flag when
establing the HTTPS and before that loading the right certificate to
the system store. How is C# different from this scenario? Even if
there's a difference, .NET is meant to be simpler but not complexer!
Thanks for any comments. Am really desperate here....
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 as below,
The underlying connection was closed: Unable to connect to the remote
server.
Stack: at System.Net.HttpWebRequest.CheckFinalStatus()
at System.Net.HttpWebRequest.EndGetResponse(IAsyncResult
asyncResult)
at System.Net.HttpWebRequest.GetResponse()
I've tried to access both a server locating outside and inside of our
Intranet. The same thing happens that the request was sent to our proxy
server, no matter if I enable or disable the proxy settings at IE. It
should be sent straight to the right destination!
I was using Ethereal to capture the packets. While in the case of using
IE when it's working properly, no matter how the proxy is set, if the
url contains a DNS name, it at first looks up to the DNS server,
returns the proper IP address, and then the packets are sent between my
own computer and the server directly, over SSLv3. But with my code, it
never goes that far. It always connects to the proxy and ofcourse the
program got bounced with error message!
Really don't understand
1) why the proxy is always playing there even after I've disabled it?
or
2) it's said that HttpWebRequest is using the same network settings
with IE but seems it isn't?
3) with unmanaged C++, it's quite simple by just setting one flag when
establing the HTTPS and before that loading the right certificate to
the system store. How is C# different from this scenario? Even if
there's a difference, .NET is meant to be simpler but not complexer!
Thanks for any comments. Am really desperate here....