Jak zignorować sprawdzenie certyfikatu, gdy ssl

Próbuję znaleźć sposób na zignorowanie sprawdzania certyfikatu, gdy zażądam zasobu Https, do tej pory znalazłem w internecie pomocny artykuł.

Ale nadal mam problem. Sprawdź mój kod. Po prostu nie rozumiem, co robi kodServicePointManager.ServerCertificateValidationCallback oznaczać.

Kiedy zostanie wywołana ta metoda delegowania? I jeszcze jedno pytanie, w którym miejscu powinienem napisać ten kod? PrzedServicePointManager.ServerCertificateValidationCallback wykonać lub wcześniejStream stream = request.GetRequestStream()?

public HttpWebRequest GetRequest()
{
    CookieContainer cookieContainer = new CookieContainer();

    // Create a request to the server
    HttpWebRequest request = (HttpWebRequest)WebRequest.Create(_remoteUrl);

    #region Set request parameters

    request.Method = _context.Request.HttpMethod;
    request.UserAgent = _context.Request.UserAgent;
    request.KeepAlive = true;
    request.CookieContainer = cookieContainer;
    request.PreAuthenticate = true;
    request.AllowAutoRedirect = false;

    #endregion

    // For POST, write the post data extracted from the incoming request
    if (request.Method == "POST")
    {
        Stream clientStream = _context.Request.InputStream;
        request.ContentType = _context.Request.ContentType;
        request.ContentLength = clientStream.Length;

        ServicePointManager.ServerCertificateValidationCallback = delegate(
            Object obj, X509Certificate certificate, X509Chain chain, 
            SslPolicyErrors errors)
            {
                return (true);
            };

            Stream stream = request.GetRequestStream();

            ....
        }

        ....

        return request;
    }
}   

questionAnswers(11)

yourAnswerToTheQuestion