API with SSL Cert on IIS

0

Category : ,

Steps involved in getting an API up-and-running on IIS7

IIS non-secure

  1. Host WCF Service on IIS
  2. Add web site on IIS
  3. Change AppPool on IIS to correct .Net framework
  4. Add DNS record to point test.URL to IP
  5. Update IIs bindings to link Host Name and port number to new url test.URL

Generate self-signed SSL Cert

There can only be 1 ssl cert per IP address so we need to use a wildcard cert that can be applied to multiple urls.

Link cert to site

Add additional binding to site on IIS, this will be for https and the self-signed cert name will need to start with a * to ensure we can enter a Hostname and that multiple sites can use the same self-signed cert on the server.

Updating the WCF web.config to handle https requests

Change the behaviorConfiguration to https and also the bindingConfiguration needs to be updated to the below

  
    
  
  
    
  



  
    
  

Testing Https with Postman

Exception for self-signed needs to be made in postman, instructions for mac and windows can be found for Postman here:
Sending requests to URLs with self signed SSLs
Using self-signed SSL certificates with Postman
Using self-signed SSL certificates with the Postman App, you just need to go to the settings and turn off the SSL cert verification. here

0 comments:

Post a Comment