Securing ASP.NET Web Services Using SSL Without a Dedicated IP Address on the Server

I need to provide a connection between my application and my web service. I own both the application and the web service, and I was wondering if HTTPS could be used for this.

I do not need a certificate to prove to myself who I really am (!), So I do not want to buy an SSL certificate from a certification authority. I just need to make sure that no one can intercept the data that I pass as the parameters of WebMethod; Can I create a free certificate and use it for communication?

One more thing: I do not want to be forced to get a dedicated public IP address for my web service, as it is hosted on a shared web server.

+3
source share
4 answers

This is definitely doable, but depends on several conditions.

  • Create your own certificate. The absence of a certification authority will not matter in your case, because your application is your own consumer.
  • The host must allow you to configure your IIS site using an SSL certificate. We hope that the tools they provide are good enough.
  • IP-, - . , IP-. SSL . - . IP- -.
+2

, IIS. , , . , , , , ServerCertificateValidationCallback:

ServicePointManager.ServerCertificateValidationCallback = 
    (sender, certificate, chain, sslPolicyErrors) => true;
0

SSL ( ) IP-. - SSL- IP-, IP-.

0

If you want to solve the problem, you can use a self-signed certificate and have a tertiary server (or use an IIS server that is self-signed) to be your own certification authority. This will allow you to generate your own certificate for free, since you control the servers, you can simply add your CA server as a trusted and intermediate root certification authority.

Create Certificate Authorities and Self-Signed SSL Certificates

0
source

Source: https://habr.com/ru/post/1733765/


All Articles