locked
.Net Error: System.Security.Authentication.AuthenticationException: The remote certificate is invalid according to the validation procedure RRS feed

  • Question

  • User-1392375537 posted

    Hi All,

    I have a client authenticated service (https://clienttestservice.com/ADD/gettoken.oauth2) tested via Postman. It works fine and gives the result. I then accessed the service thru application code and ran thru IIS-Express in Visual Studio. It works fine and gives the result. Then, I moved the code to another layer and mapped the code to new virtual directory in IIS and execute the appliation. I throws the below error message at line 45.

    Error:

    Server Error in '/PublishDOC' Application.

    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:

    Line 43: FormUrlEncodedContent getcontent = new FormUrlEncodedContent(postData);

    Line 45: var _httpresp = client.PostAsync("", getcontent).Result;

    Thanks in advance.

    Regards,

    kamal anand

    Thursday, April 26, 2018 5:58 AM

All replies