Zt:consuming webservices over HTTPS (SSL)

Source: Internet
Author: User
Tags soap
When webservices are used, a common concern are SECURITY:SOAP messages are in transferred text over the plain Anyone with a sniffer could intercept the SOAP and read it. In I opinion this could happen also to binary data, but probably it requires a little bit more hacker. So a solution are to use HTTPS (SSL) instead of HTTP, so the communication is encrypted. To accomplish this is need to get and install a certificate (issued by a certificate authority) on your webserver. In a production environment your would buy a certificate from Verisign or another down known CA, or you would install Own CA, which is a component of Windows Server. If you are want to play with HTTPS, SSL and certificates or your project is in the development phase, you can also genera Te a test certificate using the MakeCert.exe tool (included in the. NET Framework SDK). Have to add this certificate to a website in IIS, and set a port which HTTPS should use.
When you are in a HTTPS site, you are probably get a dialog window asking you if you want the certificate provided by the webserver. So the responsibility of accepting the certificate are handled by the user. Let's get back to the WebService scenario, if you are want to invoke a webservice located on a webserver which uses SSL and HT TPS there is a problem. When you make the call from code, there are no dialog window popping up, and asking if your trust the certificate (luckily B Ecause this would is pretty ugly in server-side scenarios); Probably ' ll get following exception:
An unhandled exception of type ' System.Net.WebException ' occurred in System.dll

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.