none
download a xml file from a ssl web page with a client certificate RRS feed

  • Question

  • Hi All,

    I am struggling with for couples of days now.

    I need to connect to a https server and download a xml file.

    I have the credential (user name and password) and the client certificate(it is a pfx file. I have password for CC as well).

    If you can provide a sample code for this job, I would greatly appreciate it.

    This is how the url looks like :

    https://www.abcd.myname.xds.state/aida/XmlMyServlet

    I just copied this client certificate from another project created by a different user and pasted  in my machine. Then I installed it by running the explorer. It was installed to certificate store -----> Personal folder.

    Thanks


    shamen

    Monday, November 18, 2013 4:51 PM

Answers

  • Hi workplacemobbing,

      Welcome to MSDN Forum Support.

      You can try using the following way to solve it.

     
    WebClient web = new WebClient();
    web.Credentials = new NetworkCredential("h.....", "9.......");
    string s = web.DownloadString("http://www.radionyhetene.net/download/nyheter/mp3/nyheter.xml");


    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.

    • Marked as answer by Jason Dot Wang Wednesday, November 27, 2013 3:41 AM
    Tuesday, November 19, 2013 5:35 AM

All replies

  • Hi workplacemobbing,

      Welcome to MSDN Forum Support.

      You can try using the following way to solve it.

     
    WebClient web = new WebClient();
    web.Credentials = new NetworkCredential("h.....", "9.......");
    string s = web.DownloadString("http://www.radionyhetene.net/download/nyheter/mp3/nyheter.xml");


    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.

    • Marked as answer by Jason Dot Wang Wednesday, November 27, 2013 3:41 AM
    Tuesday, November 19, 2013 5:35 AM
  • JASON DOT WANG

    I get this survey request all the time..:)

    Thanks


    shamen

    Tuesday, November 19, 2013 7:18 AM