none
How to add certificate in http client

    Question

  • Hi,

    I have smp server url and added one application in that application backend is having one web service. if i hit that smp server url it will return the meta data of the service. The issue is we need to add certification for that server via code and need to get resposne from that via http client. 

    Please find the code below

      var client = new SAP.Net.Http.HttpClient(new HttpClientHandler
                    {
                        Credentials = new NetworkCredential("Server username", "server Password),
                        ClientCertificateOptions = ClientCertificateOption.Automatic,
                        UseProxy = false
                    },
                    true);
    var response = await client.GetAsync("server ip:Portno/application name");

    When sending this request to http i am geting "The server committed a protocol violation. Section=ResponseStatusLine" this issue. I installed certificate in machine and also in application.

    Please let me know how to fix this.


    Dinesh


    Dinesh

    • Moved by Kevin Shen Friday, April 10, 2015 5:49 AM from IE web forum
    Thursday, April 9, 2015 1:20 PM

Answers

  • For Microsoft IIS/FTP/SMTP issues I'd ask over here.

    http://forums.iis.net/

     

     

     


    Regards, Dave Patrick ....
    Microsoft Certified Professional
    Microsoft MVP [Windows]

    Disclaimer: This posting is provided "AS IS" with no warranties or guarantees , and confers no rights.

    Friday, April 10, 2015 1:07 PM
    Moderator

All replies

  • Hi dinesh-vtd,

    Your post may off-topic here, this forum discusses  about web development including HTML, CSS and Script for Internet Explorer. It seems that you are using some .Net framework class library. I will move this to where is the forum for..  forum. Thanks for your understanding.

    Best regards,

    Shu Hu


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Friday, April 10, 2015 5:48 AM
  • For Microsoft IIS/FTP/SMTP issues I'd ask over here.

    http://forums.iis.net/

     

     

     


    Regards, Dave Patrick ....
    Microsoft Certified Professional
    Microsoft MVP [Windows]

    Disclaimer: This posting is provided "AS IS" with no warranties or guarantees , and confers no rights.

    Friday, April 10, 2015 1:07 PM
    Moderator