wsdl access and usage when the service endpoint is secured with https RRS feed

  • Question

  • I want to implement a SOAP interface that is secured with https.

    When I attempt to add a web reference, visula studio gives a 403 Forbidden error.

    I have a certificate for the web service but do not know how to make Visual Studio use that certificate when adding the web service as a reference.

    Once the wsdl is accessible, the next problem will be how to have my Visual Basic application also use the certificate.

    I am attempting to code with WCF

    Can someone point me in the right direction?  I expect that this will boil down to just a few lines of code.

    Jim Durbin

    LIMS Consultant

    Friday, April 4, 2014 4:29 PM


  • Hi,

    Since add service reference is failing, you can use svcutil to generate the client from the WSDL file that you have.
    This will generate a file, Reference.cs, that contains the proxy classes to the service (you can give this file whatever name you want). Then add this file to your project.  A config file, output.config, will also be generated. You can also add this configuration to your application configuration instead of typing it all in by hand.

    Now you can follow this MSDN article on using Transport Security with Certificate Authentication.  You can skip down to the client section where it shows how to attach the certificate to the request in code as well as in configuration.

    Best Regards,
    Amy Peng

    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.

    Tuesday, April 8, 2014 7:49 AM

All replies