Zt: Consuming Webservices over HTTPS (SSL)

Source: Internet
Author: User

When Webservices are used, a common concern is security: SOAP messages are transferred in plain text over the network, so anyone with a sniffer cocould intercept the SOAP message and read it. in my opinion this cocould happen also to binary data, but probably it requires a little bit more hacker skills. so a solution is to use HTTPS (SSL) instead of HTTP, so the communication is encrypted. to accomplish this, you need to get and install a certificate (issued by a Certificate Authority) on your webserver. in a production environment you wowould buy a certificate from Verisign or another well known CA, or you wocould install your own CA, which is a component of Windows Server. if you only want to play with HTTPS, SSL and certificates or your project is in the development phase, you can also generate a test certificate using the MakeCert.exe tool (encoded in.. NET Framework SDK ). after that you have to add this certificate to a website in IIS, and set a port which HTTPS shocould use.
When you browse to a HTTPS site, you probably get a dialog window asking you if you want to trust the certificate provided by the webserver. so the responsibility of accepting the certificate is handled by the user. let's get back to the webservice scenario, if you want to invoke a webservice located on a webserver which uses SSL and HTTPS there is a problem. when you make the call from code, there is no dialog window popping up, and asking if you trust the certificate (luckily because this wocould be pretty ugly in server-side scenarios ); probably you'll get following exception:
An unhandled exception of type 'System. Net. webexception' occurred in System. dll

Related Article

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.