locked
The remote certificate is invalid according to the validation procedure amazon s3 on file upload Ask Question RRS feed

  • Question

  • The remote certificate is invalid according to the validation procedure. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

    Exception Details: System.Security.Authentication.AuthenticationException: The remote certificate is invalid according to the validation procedure.

    Source Error:

    An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

    Stack Trace:

    [AuthenticationException: The remote certificate is invalid according to the validation procedure.]
       System.Net.Security.SslState.StartSendAuthResetSignal(ProtocolToken message, AsyncProtocolRequest asyncRequest, Exception exception) +1764900
       System.Net.Security.SslState.CheckCompletionBeforeNextReceive(ProtocolToken message, AsyncProtocolRequest asyncRequest) +6585992
    Wednesday, April 11, 2018 12:05 PM

All replies

  • I'm afraid you're going to have to work with Amazon on this one. This is an issue related to security between your app and Amazon. We cannot help there.

    Michael Taylor http://www.michaeltaylorp3.net

    Wednesday, April 11, 2018 1:41 PM
  • Hello amir451,

    The issue indicate the certificate that come from remote server is invalid, and you could ignore those error by settings the ServerCertificateValidationCallback as below code.

    SslStream sslStream = new SslStream(client.GetStream(),false,new RemoteCertificateValidationCallback(ValidateServerCertificate),null);
    
    public static bool ValidateServerCertificate(object sender, X509Certificate certificate, X509Chain chain, SslPolicyErrors sslPolicyErrors)
            {
                return true;
            }
    

    Best Regards,

    Neil Hu


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Thursday, April 12, 2018 4:39 AM