Add the source code following in system.webServer section (web.config):
<rewrite>
  <rules>
    <rule name="HTTPS" stopProcessing="true">
      <match url="(.*)" />
      <conditions>
        <add input="{HTTPS}" pattern="^OFF$" />
      </conditions>
      <action type="Redirect" url="https://WWW.YOUR-DOMAIN.COM/{R:1}" redirectType="Permanent" />
    </rule>
  </rules>
</rewrite>