This site can’t provide a secure connection

WebSpider 76 Reputation points
2021-07-31T15:50:34.037+00:00

Hi guys... i getting this error message when i open my web application after i installed visual studio 2019.

This site can’t provide a secure connection

I have tried changing my web.config to the following but failed.

<rewrite>
  <rules>   
    <rule name="HTTP to HTTPS Redirect" stopProcessing="true">
      <match url="(.*)" />
      <conditions>
         <add input="{HTTP_HOST}" pattern="localhost" negate="true" />
      </conditions>
         <action type="Redirect" url="https://{HTTP_HOST}/{R:1}" redirectType="Found" />
    </rule>
 </rules>
</rewrite>
Internet Information Services
{count} vote

Accepted answer
  1. HuryShen - MSFT 321 Reputation points
    2021-08-02T02:09:50.417+00:00

    Hi @WebSpider ,

    You can right click your application in visual studio and click "Properties".

    Then click "Web" tab and you can find "Project Url" input box. Change the url in this input box from original http://localhost:50997 to https://localhost:44366.

    119595-image.png

    After that, you do not need to change port number manually when you start the application in visual studio. It will browse with https://localhost:44366 automatically.


    If the answer is helpful, please click "Accept Answer" and upvote it.

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. WebSpider 76 Reputation points
    2021-08-05T06:30:33.713+00:00

    hi @HuryShen - MSFT

    Not sure why its show different screen when i right click and Properties

    120731-01.png