In order to develop apps using the HTTPS URL on your local machine, you should create SSL certificates.
SSL works by ensuring that any data transferred between users and websites or between two systems remains harder(if not impossible) to read as the data might potentially include some sensitive information, i.e. names, payment details etc. Please read this article for more details.
Creating a development SSL certificate will stop you from seeing the following error when you visit your local IIS website and potentially save you some headaches in the near future as things get more strict with security.
There are multiple ways to generate a SSL certificate. I prefer to use Windows PowerShell to generate my local certificates and here is how you can do it;
- Open up PowerShell and run it as an Administrator
- Type the following command for your project and hit enter.
- This will generate an SSL certificate for you. You can check it by going to your IIS / Server Certificates
- The next step is to open up "Manage computer certificates" to start using your new certificate in your app.
- Now you are ready to use your new SSL certificate for you local IIS app. Go to IIS Manager and add a new website or go to your existing website - make sure your project name is same as your certificate name.
- Go to bindings, add your HTTPS binding using 443 port number and select your new SSL certificate, check "Require Server Name Indication" and save your changes.
Comments
Post a Comment