Hi.
I'm using this code to access an https service:
public class AcceptAllCertificatePolicy : ICertificatePolicy
{
public bool CheckValidationResult(ServicePoint srvPoint, X509Certificate
certificate, WebRequest request, int certificateProblem)
{
return true;
}
}
HttpWebRequest myReq = (HttpWebRequest)WebRequest.Create(URL +
strbXMLEncoded);
//.Create(URL + strbXMLEncoded);
myReq.MaximumAutomaticRedirections = 4;
myReq.MaximumResponseHeadersLength = 4;
myReq.Method = "GET";
myReq.ContentLength = URL.Length + strbXMLEncoded.Length;
myReq.ContentType = "application/x-www-form-urlencoded";
HttpWebResponse response = null;
int tmp = ServicePointManager.DefaultConnectionLimit;
try
{
response = (HttpWebResponse)myReq.GetResponse();
}
The last line hangs and never comes back, no exception nothing.
It only happens against a certain server, trying this code with
https://www.gmail.com works fine.
I've looked in wireshark and I got this results:
After Getting Application data and sending an ACK there is a 59 seconds
delay and then I get there more packets:
Encrpted Alert (from the server back to me)
FIN, ACK (from the server back to me)
then I send ACK and RST, ACK.
(in the gmail test I didn't get the Encrypted Alert and no RST at the end...)
This is on wire shark, the visuall studio code is just hanged, no exception
no return from the call.
what can it be ?
Thanks,
Dani